Hi,
In the action Send Email, I'm trying to use a variabel in the To: item.
But I get a error, invalid adress.
I is not possible use variables in the To: item?
Håkan in Sweden
Probably you are doing something wrong or your variable not contain valid email address. See the example below. I've just tested this. It's working fine.
;**********************
;* RoboTask Task file *
;* Do not edit! *
;**********************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|188537163
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task131"
Hide=INTEGER|0
ID=INTEGER|1245391391
Name=STRING|"Send email test"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
[Actions]
Action1=FOLDER
Action2=FOLDER
[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""TO_MAIL"" with value ""oleg@robotask.com"""
Params=FOLDER
[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"TO_MAIL"
varvalue=STRING|"oleg@robotask.com"
[Actions\Action2]
ActionID=STRING|"A_INET_SENDMAIL"
Enabled=INTEGER|-1
Name=STRING|"Send Email"
Params=FOLDER
[Actions\Action2\Params]
attachcount=STRING|"0"
auth=STRING|"0"
from=STRING|"oleg@robotask.com"
host=STRING|"localhost"
html=STRING|"0"
msg0=STRING|"This is a test only"
msgcount=STRING|"1"
password=STRING|"2488925202262242647415210"
port=STRING|"25"
subject=STRING|"This is a test message"
to=STRING|"{to_mail}"
;**********************
;* RoboTask Task file *
;* Do not edit! *
;**********************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|188537163
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task131"
Hide=INTEGER|0
ID=INTEGER|1245391391
Name=STRING|"Send email test"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
[Actions]
Action1=FOLDER
Action2=FOLDER
[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""TO_MAIL"" with value ""oleg@robotask.com"""
Params=FOLDER
[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"TO_MAIL"
varvalue=STRING|"oleg@robotask.com"
[Actions\Action2]
ActionID=STRING|"A_INET_SENDMAIL"
Enabled=INTEGER|-1
Name=STRING|"Send Email"
Params=FOLDER
[Actions\Action2\Params]
attachcount=STRING|"0"
auth=STRING|"0"
from=STRING|"oleg@robotask.com"
host=STRING|"localhost"
html=STRING|"0"
msg0=STRING|"This is a test only"
msgcount=STRING|"1"
password=STRING|"2488925202262242647415210"
port=STRING|"25"
subject=STRING|"This is a test message"
to=STRING|"{to_mail}"
Last edited by Oleg on Sat Jan 21, 2006 1:15 pm, edited 1 time in total.
Thank you, you've found a bug. We shall fix it in next release necessarily. Try to send mail with using text loop now. See example below.
;**********************
;* RoboTask Task file *
;* Do not edit! *
;**********************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|782314203
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task371"
Hide=INTEGER|0
ID=INTEGER|1550773634
Name=STRING|"Send email test (by loop)"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
[Actions\Action1]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"Text Loop"
Params=FOLDER
[Actions\Action1\Params]
destvar=STRING|"TO_MAIL"
line0=STRING|"oleg@robotask.com"
line1=STRING|"oleg@robotask.com"
linecount=STRING|"2"
sourcetext=STRING|"1"
[Actions\Action2]
ActionID=STRING|"A_INET_SENDMAIL"
Enabled=INTEGER|-1
Name=STRING|"Send Email"
Params=FOLDER
[Actions\Action2\Params]
attachcount=STRING|"0"
auth=STRING|"0"
from=STRING|"oleg@robotask.com"
host=STRING|"localhost"
html=STRING|"0"
msg0=STRING|"This is a test only"
msgcount=STRING|"1"
password=STRING|"2514524939246812673840557"
port=STRING|"25"
subject=STRING|"This is a test message"
to=STRING|"{to_mail}"
[Actions\Action3]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
;**********************
;* RoboTask Task file *
;* Do not edit! *
;**********************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|0
CatID=INTEGER|782314203
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task371"
Hide=INTEGER|0
ID=INTEGER|1550773634
Name=STRING|"Send email test (by loop)"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
[Actions\Action1]
ActionID=STRING|"A_LOOP_TEXT"
Enabled=INTEGER|-1
Name=STRING|"Text Loop"
Params=FOLDER
[Actions\Action1\Params]
destvar=STRING|"TO_MAIL"
line0=STRING|"oleg@robotask.com"
line1=STRING|"oleg@robotask.com"
linecount=STRING|"2"
sourcetext=STRING|"1"
[Actions\Action2]
ActionID=STRING|"A_INET_SENDMAIL"
Enabled=INTEGER|-1
Name=STRING|"Send Email"
Params=FOLDER
[Actions\Action2\Params]
attachcount=STRING|"0"
auth=STRING|"0"
from=STRING|"oleg@robotask.com"
host=STRING|"localhost"
html=STRING|"0"
msg0=STRING|"This is a test only"
msgcount=STRING|"1"
password=STRING|"2514524939246812673840557"
port=STRING|"25"
subject=STRING|"This is a test message"
to=STRING|"{to_mail}"
[Actions\Action3]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
OK,
My case is, I'm using the Basiccode to run a select case on the 4 first letters in a filename. Depend on which file, I will set the mailvariable with different recivers. Sometimes I have more than one adress to send.
/Håkan
My case is, I'm using the Basiccode to run a select case on the 4 first letters in a filename. Depend on which file, I will set the mailvariable with different recivers. Sometimes I have more than one adress to send.
/Håkan