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 list ;-)
HTH Cheers *Bryan Stevenson*B.Comm. President & CEO Electric Edge Systems Group Inc. - makers of FACTS™ phone: 250.480.0642 cell: 250.920.8830 e-mail: br...@fisheryfacts.com <mailto:br...@fisheryfacts.com> web: www.fisheryfacts.com <http://www.fisheryfacts.com> ------------------------------------------------------------------------ Please consider the environment before printing this e-mail -----CONFIDENTIALITY------ This message, including any attachments, is confidential and may contain information that is privileged or exempt from disclosure. It is intended only for the person to whom it is addressed unless expressly authorized otherwise by the sender. If you are not an authorized recipient, please notify the sender immediately and permanently destroy all copies of this message and attachments. On 2015-04-02 3:11 PM, Dave Long wrote: > 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 > going? > > Here's the code: > > <CFLOOP list="#Form.SelectedRecipients#" index="Recipient"> > <CFMAIL > from="#Form.Sender#" > to="#Recipient#" > subject="#Form.Subject#" > type="HTML" > > > <html><head><link rel="stylesheet" > href="http://www.northgoods.com/global.css" type="text/css" /></head><body > bgcolor="black"> > <table width=800 align="center"> > <TR> > <TD align="center" colspan=2> > <table width=800 align="center" border="4" cellpadding="10" > bgcolor="black"><tr><td> > <strong><font face="Arial" size="+1" color="##FF6600"> > #Form.Message# > </font></strong> > </td></tr></table> > <table align="center"> > <tr><th colspan="2"><strong><font face="Arial" size="-1" > color="##FF6600">If you would like to be removed from<br>our mailing list, > please click here:</font></strong><br> > <a > href="http://www.northgoods.com/unsubscribe.cfm?delEmail=#Recipient#" > title="UNSUBSCRIBE"><font face="Arial" size="-1" > color="white"><strong>UNSUBSCRIBE</strong></font></a><br> > <font face="Arial" size="-1" color="##FF6600">You will receive one last > message from us to confirm your removal from our > list.</font></strong></th></tr> > </TABLE></body></html> > </CFMAIL> > </CFLOOP> > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360351 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm