Handling invalid recipient in mailing list

2015-04-02 Thread Dave Long
I am trying to send a mass mailing to a somewhat carelessly created list of contacts using e-mail addresses which were not verified at the time of entry. Whenever the cfloop tag comes to an erroneous recipient, it quits and throws an error. Is there anything I can do to the code to make it keep

RE: Handling invalid recipient in mailing list

2015-04-02 Thread Mark A Kruger
Dave, A) What is the error. Fixing the error will keep your loop going. B) Using a try/catch INSIDE the loop will allow you to keep it going - with the caveat that you will miss whatever email throws the error so you might want to log that inside the catch. -Mark -Original Message-

Re: Handling invalid recipient in mailing list

2015-04-02 Thread Bryan Stevenson
You may want to add a cftry/cfcatch (around the cfmail block) so when the error occurs it can be handled gracefully via cfcatch (like tagging the recipient record as having a bad address) and the loop will keep going - valid recipients get their mail and the others can be cleansed from the

RE: Handling invalid recipient in mailing list

2015-04-02 Thread Rick
cftry Run you CFMAIL.. cfcatchMark email bad in database/cfcatch /cftry -Original Message- From: Dave Long [mailto:d...@northgoods.com] Sent: Thursday, April 02, 2015 5:12 PM To: cf-talk Subject: Handling invalid recipient in mailing list I am trying to send a mass mailing to a

RE: Handling invalid recipient in mailing list

2015-04-02 Thread William Seiter
Dave, You could have your code 'automatically' scrub the list and use a 'log' to keep track of the changes. This way you won't have to do a test run. Also, you could set up your code on a 'dummy' email server that will send the email but trap it prior to being mailed, this way you don't have

RE: Handling invalid recipient in mailing list

2015-04-02 Thread Dave Long
Thanks to all. The scheme worked perfectly. Next I will have to warn my recipients that a test is coming so I can remove invalid recipients. Unless maybe you can suggest a method to delete them as they occur. I intend to add a confirmation message requirement to our contact form, which should

Re: Handling invalid recipient in mailing list

2015-04-02 Thread Mike K
You probably know already, but I'll say it just in case ... you can rarely have a 100% clean list. I have found that even after you just clean up a list, your next mailing will have rejects in it. Even if it's only a few minutes since you last cleaned it up. Your error handling needs to be