Skip to main content
Known Participant
November 2, 2012
Question

Debugging CFMAIL attribute / bad address errors

  • November 2, 2012
  • 2 replies
  • 1503 views

We sent out email blasts by querying the database for a list of addresses and have been getting two errors which seems to kill off the loop we use to call CFMAIL:

"Error","mailWorker-5","11/01/12","10:15:29",,"javax.mail.SendFailedException: Invalid Addresses;   nested exception is:com.sun.mail.smtp.SMTPAddressFailedException: 501 5.5.4 Invalid Address "

and

"Error","ajp-bio-8012-exec-251","10/29/12","10:16:31",,"Attribute validation error for tag CFMAIL."

I suspect that both are related to some type of malformed email addresses, but how would i determine which email address? is there a way to determine which attribute caused an error?

    This topic has been closed for replies.

    2 replies

    BKBK
    Community Expert
    Community Expert
    November 5, 2012

    ggantzer2 wrote:

    ... have been getting two errors which seems to kill off the loop we use to call CFMAIL

    It's a shame if one error should kill off the loop. Imagine the error occurring after just 3 sent mails out of a 5000-message job! If throughput is important, then you might want to redesign as follows:

    <cfloop query>

    <cftry>

    <cfmail>

    </cfmail>

    <cfcatch type="any">

    <!--- handle errors, for example, log e-mail address and error message --->

    </cfcatch>

    </cftry>

    </cfloop>

    Inspiring
    November 2, 2012

    ColdFusion has an isValid() function that will tell you if the string has the correct format for an email address.  As far as I know, the only thing that will tell you if a properly formatted email address actually exists is a delivery failure notification.

    ggantzer2Author
    Known Participant
    November 4, 2012

    that worked like a charm. thanks so much for your help.