Email to Multible Recipients


Recommended Posts

When I have a new job start, I have the user enter in the client's email address(es). The user enters them in to an edit box. If more than 1 address needs to be entered, he seperates them with a semi-colon.

Every 3 hours I send an automated updated with current data to the email addresses listed.

Here's my problem. I can't get more than one of them to work. I've disabled the multi-address logic and send it to only 1 address at this time. I'd like to get it fully fuctional.

Questions,

1) Can EmailstrTo be set to "bob@site.com; stan@site.com; julie@anothersite.com" to have multible delivery points. I've tried seperating with commas and semi colons, without luck.

2) Is there a widgit like ftp.BytesTransfered() that will return -1 when a single email is sent to a single address. I could easily parse my channel holding the emails and put the email.sent into a loop with something like waituntil(email.emailtransfered==-1).

3) Or lastly my least favorite idea parse it and delay 30 seconds before looping and sending the next address

Thanks,

Mike

Link to comment
Share on other sites

Both ; and , should work as a delimiter for email addresses. It is most likely that your email server does not properly handle multiple addresses. I just tried it and our server works fine, and as far as I know it has always worked (and we are on our 4th email server). The other possibility is that it just appears that multiples don't work, when in fact, the 2nd, 3rd and other emails are actually just being rejected because of your relaying settings of your server. Try reordering the emails and see if you still only get one.

If you can't figure the problem with the server, you'll have to go with option 3, though really you only need maybe 5 second delay unless you are sending big attachments. There is no BytesTransfered() type function. If you go that route, check out the -1 option of the parse() function. Doing:

parse("bob@site.com; stan@site.com; julie@anothersite.com",-1,";")

will return:

{"bob@site.com"," stan@site.com"," julie@anothersite.com"}

which you can then cycle through. This is faster than repetitively calling parse() with a different index.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.