How can I put a list of emails from a .txt file into the recipients field ??
I try the follow command
Let>k=1
Label>start
ReadLn>c:\temp\File.txt,k,line
If>line=##EOF##,finish
Let>recipients=%recipients%%CRLF%%line%
Let>k=k+1
Goto>start
Label>finish
It's like the same as in the ReadLn
Let>k=1
Label>start
ReadLn>c:\temp\test.txt,k,line
If>line=##EOF##,finish
Message>line
Let>k=k+1
Goto>start
Label>finish
But I change body for recipients. The Macro run, run and run, she Crash so...
Thanx in advance
SMTPSendMail.... Recipients...
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
This is how I keep my syntax for emails. It shows me that I can have multiple recipients/attachments by separating with each with a semicolon.
SMTPSendMail>To_email(;s),smtp,From_email,From_name,Subject,Body,Attachment(;s)
So try changing
FROM:
SMTPSendMail>To_email(;s),smtp,From_email,From_name,Subject,Body,Attachment(;s)
So try changing
FROM:
TO:Let>recipients=%recipients%%CRLF%%line%
Let>recipients=%recipients%;%line%
SMTPSendEmail>%recipients%,smtp,From_email,From_name,%Subject%,%Body%,%Attachment%
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
As Bob says the recipients list must be delimited by semicolons. This works. So if yours isn't it must be something to do with the way you are building the list - not with the SMTPSendMail command.
Step through your code with the debugger and watch list. If still stuck send a copy of your code so that we can try to help.
Step through your code with the debugger and watch list. If still stuck send a copy of your code so that we can try to help.
MJT Net Support
[email protected]
[email protected]