Page 1 of 1

Check for Email

Posted: Thu Jan 19, 2006 8:57 am
by steph@vds
Hi,

I wonder what is the correct procedure to use the Check for Email
action . I want to check Mail every 5 min and show a message when a new
message is arrived.
The problem is that the task never stops even if Mail is (or not) waiting.
So I always have the message "New mail arrived".
I tried to assign a variable to the action "Check for Email". Unsuccessfull.
Here is my task :
;**********************
;* RoboTask Task file *
;* Do not edit!       *
;**********************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1789981768
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task32"
Hide=INTEGER|0
ID=INTEGER|2099035350
Name=STRING|"Check For Email..."
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER

[Actions\Action1]
ActionID=STRING|"A_INET_CHECKMAIL"
Enabled=INTEGER|-1
Name=STRING|"Check For Email"
Params=FOLDER

[Actions\Action1\Params]
action=STRING|"0"
password=STRING|"3846439339375483830241631"
port=STRING|"110"
server=STRING|"pop3.videodeseine.com"
stoptaskif=STRING|"1"
userid=STRING|"info@videodeseine.com"
variable=STRING|"{MAIL}"

[Actions\Action2]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action2\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"3"
value1=STRING|"{MAIL}"
value2=STRING|"TRUE"

[Actions\Action3]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""New mail arrived"""
Params=FOLDER

[Actions\Action3\Params]
icon=STRING|"1"
msg0=STRING|"New mail arrived"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action4]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Events]
Event1=FOLDER

[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_GENERAL_SHEDULER"
Params=FOLDER

[Events\Event1\Params]
id=STRING|"T16LBMHP"
periodicity=STRING|"0"
startdate=STRING|"38736"
time0=STRING|"28800000"
time1=STRING|"28980000"
time10=STRING|"30600000"
time100=STRING|"46800000"
time101=STRING|"46980000"
time102=STRING|"47160000"
time103=STRING|"47340000"
time104=STRING|"47520000"
time105=STRING|"47700000"
time106=STRING|"47880000"
time107=STRING|"48060000"
time108=STRING|"48240000"
time109=STRING|"48420000"
time11=STRING|"30780000"
time110=STRING|"48600000"
time111=STRING|"48780000"
time112=STRING|"48960000"
time113=STRING|"49140000"
time114=STRING|"49320000"
time115=STRING|"49500000"
time116=STRING|"49680000"
time117=STRING|"49860000"
time118=STRING|"50040000"
time119=STRING|"50220000"
time12=STRING|"30960000"
time120=STRING|"50400000"
time121=STRING|"50580000"
time122=STRING|"50760000"
time123=STRING|"50940000"
time124=STRING|"51120000"
time125=STRING|"51300000"
time126=STRING|"51480000"
time127=STRING|"51660000"
time128=STRING|"51840000"
time129=STRING|"52020000"
time13=STRING|"31140000"
time130=STRING|"52200000"
time131=STRING|"52380000"
time132=STRING|"52560000"
time133=STRING|"52740000"
time134=STRING|"52920000"
time135=STRING|"53100000"
time136=STRING|"53280000"
time137=STRING|"53460000"
time138=STRING|"53640000"
time139=STRING|"53820000"
time14=STRING|"31320000"
time140=STRING|"54000000"
time141=STRING|"54180000"
time142=STRING|"54360000"
time143=STRING|"54540000"
time144=STRING|"54720000"
time145=STRING|"54900000"
time146=STRING|"55080000"
time147=STRING|"55260000"
time148=STRING|"55440000"
time149=STRING|"55620000"
time15=STRING|"31500000"
time150=STRING|"55800000"
time151=STRING|"55980000"
time152=STRING|"56160000"
time153=STRING|"56340000"
time154=STRING|"56520000"
time155=STRING|"56700000"
time156=STRING|"56880000"
time157=STRING|"57060000"
time158=STRING|"57240000"
time159=STRING|"57420000"
time16=STRING|"31680000"
time160=STRING|"57600000"
time161=STRING|"57780000"
time162=STRING|"57960000"
time163=STRING|"58140000"
time164=STRING|"58320000"
time165=STRING|"58500000"
time166=STRING|"58680000"
time167=STRING|"58860000"
time168=STRING|"59040000"
time169=STRING|"59220000"
time17=STRING|"31860000"
time170=STRING|"59400000"
time171=STRING|"59580000"
time172=STRING|"59760000"
time173=STRING|"59940000"
time174=STRING|"60120000"
time175=STRING|"60300000"
time176=STRING|"60480000"
time177=STRING|"60660000"
time178=STRING|"60840000"
time179=STRING|"61020000"
time18=STRING|"32040000"
time180=STRING|"61200000"
time181=STRING|"61380000"
time182=STRING|"61560000"
time183=STRING|"61740000"
time184=STRING|"61920000"
time185=STRING|"62100000"
time186=STRING|"62280000"
time187=STRING|"62460000"
time188=STRING|"62640000"
time189=STRING|"62820000"
time19=STRING|"32220000"
time190=STRING|"63000000"
time191=STRING|"63180000"
time192=STRING|"63360000"
time193=STRING|"63540000"
time194=STRING|"63720000"
time195=STRING|"63900000"
time196=STRING|"64080000"
time197=STRING|"64260000"
time198=STRING|"64440000"
time199=STRING|"64620000"
time2=STRING|"29160000"
time20=STRING|"32400000"
time200=STRING|"64800000"
time201=STRING|"64980000"
time202=STRING|"65160000"
time203=STRING|"65340000"
time204=STRING|"65520000"
time205=STRING|"65700000"
time206=STRING|"65880000"
time207=STRING|"66060000"
time208=STRING|"66240000"
time209=STRING|"66420000"
time21=STRING|"32580000"
time210=STRING|"66600000"
time211=STRING|"66780000"
time212=STRING|"66960000"
time213=STRING|"67140000"
time214=STRING|"67320000"
time215=STRING|"67500000"
time216=STRING|"67680000"
time217=STRING|"67860000"
time218=STRING|"68040000"
time219=STRING|"68220000"
time22=STRING|"32760000"
time220=STRING|"68400000"
time23=STRING|"32940000"
time24=STRING|"33120000"
time25=STRING|"33300000"
time26=STRING|"33480000"
time27=STRING|"33660000"
time28=STRING|"33840000"
time29=STRING|"34020000"
time3=STRING|"29340000"
time30=STRING|"34200000"
time31=STRING|"34380000"
time32=STRING|"34560000"
time33=STRING|"34740000"
time34=STRING|"34920000"
time35=STRING|"35100000"
time36=STRING|"35280000"
time37=STRING|"35460000"
time38=STRING|"35640000"
time39=STRING|"35820000"
time4=STRING|"29520000"
time40=STRING|"36000000"
time41=STRING|"36180000"
time42=STRING|"36360000"
time43=STRING|"36540000"
time44=STRING|"36720000"
time45=STRING|"36900000"
time46=STRING|"37080000"
time47=STRING|"37260000"
time48=STRING|"37440000"
time49=STRING|"37620000"
time5=STRING|"29700000"
time50=STRING|"37800000"
time51=STRING|"37980000"
time52=STRING|"38160000"
time53=STRING|"38340000"
time54=STRING|"38520000"
time55=STRING|"38700000"
time56=STRING|"38880000"
time57=STRING|"39060000"
time58=STRING|"39240000"
time59=STRING|"39420000"
time6=STRING|"29880000"
time60=STRING|"39600000"
time61=STRING|"39780000"
time62=STRING|"39960000"
time63=STRING|"40140000"
time64=STRING|"40320000"
time65=STRING|"40500000"
time66=STRING|"40680000"
time67=STRING|"40860000"
time68=STRING|"41040000"
time69=STRING|"41220000"
time7=STRING|"30060000"
time70=STRING|"41400000"
time71=STRING|"41580000"
time72=STRING|"41760000"
time73=STRING|"41940000"
time74=STRING|"42120000"
time75=STRING|"42300000"
time76=STRING|"42480000"
time77=STRING|"42660000"
time78=STRING|"42840000"
time79=STRING|"43020000"
time8=STRING|"30240000"
time80=STRING|"43200000"
time81=STRING|"43380000"
time82=STRING|"43560000"
time83=STRING|"43740000"
time84=STRING|"43920000"
time85=STRING|"44100000"
time86=STRING|"44280000"
time87=STRING|"44460000"
time88=STRING|"44640000"
time89=STRING|"44820000"
time9=STRING|"30420000"
time90=STRING|"45000000"
time91=STRING|"45180000"
time92=STRING|"45360000"
time93=STRING|"45540000"
time94=STRING|"45720000"
time95=STRING|"45900000"
time96=STRING|"46080000"
time97=STRING|"46260000"
time98=STRING|"46440000"
time99=STRING|"46620000"
timecount=STRING|"221"

---------------------
Steph@vds

Check for Email

Posted: Fri Jan 20, 2006 12:27 am
by Oleg
I've tested your example and can give a couple of recommendations

1. If you want to launch the task every 5 minutes, I advise to use "cyclic" event. It very simple.
2. If you want to use variable in "Check For Mail" action, you should use name of variable without brackets {}. Brackets shows to RoboTask that it need replace of this string with content of variable.

Below are two examples of using "Check for Email" action:
1-st with using of variable
2-nd without variable

Example 1
;**********************
;* RoboTask Task file *
;* Do not edit!       *
;**********************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|1614811947
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task368"
Hide=INTEGER|0
ID=INTEGER|1850497124
Name=STRING|"Check For Email (1)"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER

[Actions\Action1]
ActionID=STRING|"A_INET_CHECKMAIL"
Enabled=INTEGER|-1
Name=STRING|"Check For Email"
Params=FOLDER

[Actions\Action1\Params]
action=STRING|"1"
password=STRING|"3846439339375483830241631"
port=STRING|"110"
server=STRING|"pop3.videodeseine.com"
stoptaskif=STRING|"1"
userid=STRING|"info@videodeseine.com"
variable=STRING|"MAIL"

[Actions\Action2]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action2\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"3"
value1=STRING|"{MAIL}"
value2=STRING|"TRUE"

[Actions\Action3]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""New mail arrived"""
Params=FOLDER

[Actions\Action3\Params]
icon=STRING|"1"
msg0=STRING|"New mail arrived"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action4]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"

[Events]
Event1=FOLDER

[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_GENERAL_CYCLIC"
Params=FOLDER

[Events\Event1\Params]
id=STRING|"KSYFTKKV"
interval=STRING|"5"


Example 2
;**********************
;* RoboTask Task file *
;* Do not edit!       *
;**********************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|1614811947
ContinueOnError=INTEGER|0
Events=FOLDER
ExternalName=STRING|"Task369"
Hide=INTEGER|0
ID=INTEGER|368273702
Name=STRING|"Check For Email (2)"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3

[Actions]
Action1=FOLDER
Action2=FOLDER

[Actions\Action1]
ActionID=STRING|"A_INET_CHECKMAIL"
Enabled=INTEGER|-1
Name=STRING|"Check For Email"
Params=FOLDER

[Actions\Action1\Params]
action=STRING|"0"
password=STRING|"3846439339375483830241631"
port=STRING|"110"
server=STRING|"pop3.videodeseine.com"
stoptaskif=STRING|"1"
userid=STRING|"info@videodeseine.com"
variable=STRING|"MAIL"

[Actions\Action2]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""New mail arrived"""
Params=FOLDER

[Actions\Action2\Params]
icon=STRING|"1"
msg0=STRING|"New mail arrived"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Events]
Event1=FOLDER

[Events\Event1]
Enabled=INTEGER|-1
EventID=STRING|"E_GENERAL_CYCLIC"
Params=FOLDER

[Events\Event1\Params]
id=STRING|"RFIBZH23"
interval=STRING|"5"

Check for Email

Posted: Fri Jan 20, 2006 1:14 am
by steph@vds
Hi Oleg,

I tried your tasks (thanx for the cyclic event).
I still have a problem because Robotask always show me that a new mail
is arrived even if it's not true. I don't think that Robotask really
know if mail is waiting or not. How Robotask interpret if mail is
waiting ?

Steph@vds

Check for Email

Posted: Fri Jan 20, 2006 1:44 am
by Oleg
Check for Emal action checks you mail-box. If specified mailbox is not empty (at least 1 message) it means that mail is waiting. If mail box is empty (you've downloaded into your mail client and deleted all messages) it means that mail is not waiting.
I think that you use web-client (some form on website) for reading your mail. If your INBOX is always non empty, "Check for Mail" always will indicate that mail is waiting. This action doesn't distinguish old and new messages. It tell you whether your mailbox is empty or not.