Page 1 of 1

How to pass "TO Email" address dynamically in DSSe

Posted: Thu May 04, 2006 3:25 am
by Madhu1981
Hi, I have a sequential file which contains Email Ids.

I have to write a routine, which should fetches the email id from the sequential file and mail has to be send dynamically to that email id which has been fetched earlier.

i have written a code like:

$INCLUDE DSINCLUDE JOBCONTROL.H

sleep 20

Dummy=0

vParamFile = '/dir1/folder/filename.txt'

OpenSeq vParamFile To FileVar Else
Call DSLogWarn("Cannot open ":vParamFile , "Cannot Open ParamFile")
End
loop
ReadSeq Dummy From FileVar Else Exit ;

code = DSSendMail("From:me@here.com\nTo:Dummy\nSubject:Hi ya\nBody:Line1")

Call DSLogInfo(Dummy, "Job Control")
repeat

CloseSeq FileVar


But the "ReadSeq Dummy From FileVar Else Exit " the dummy value is not getting passed to the TO address in the DSSendmail command.

let me know how to pass the to address to the DSSendmail command,

thanks,

Posted: Thu May 04, 2006 7:17 am
by kduke
should be:

Code: Select all

code = DSSendMail("From:me@here.com\nTo:": Dummy :"\nSubject:Hi ya\nBody:Line1")

Thanks Duke

Posted: Fri May 05, 2006 12:11 am
by Madhu1981
kduke wrote:should be:

Code: Select all

code = DSSendMail("From:me@here.com\nTo:": Dummy :"\nSubject:Hi ya\nBody:Line1")
Thanks a lot Duke, Its working fine now.