What is the syntax using variables as parameters in DSSendMail? I have tried the following and it does not work:
Recipients = ToList
Ans = DSSendMail("From:aaa.xxx.com\nTo:#Recipients#\nSubject:Job Failure\nBody:Hourly failed to load successfully\n")
DSSendMail - Syntax using variable as parameters
Moderators: chulett, rschirm, roy
There are no parameters inside those double-quotes, they make them a literal string. You'd need to build it in pieces, text and parameters separately and then concatenate things together. For example:
Ans = DSSendMail("From:aaa.xxx.com\nTo:":#Recipients#:"\nSubject:Job Failure\nBody:Hourly failed to load successfully\n")
Ans = DSSendMail("From:aaa.xxx.com\nTo:":#Recipients#:"\nSubject:Job Failure\nBody:Hourly failed to load successfully\n")
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 46
- Joined: Tue Mar 20, 2007 3:30 am
- Location: India