Skip to main content
Participant
August 8, 2009
Question

CFMail - How do I know if email is bounced?

  • August 8, 2009
  • 2 replies
  • 4265 views

Hi,

Simply, I need to send a newsletter to 100 email addresses I have, and what I need to know is to see if each email is bounced or not.

How can I do that?

Thanks

This topic has been closed for replies.

2 replies

Inspiring
August 12, 2009

The email system is, by its fundamental nature, an asynchronous delivery system.  "Bounced" emails might not "return to sender" for many days, if at all.  They will be accepted for delivery as-tendered, and if subsequent attempts at delivery (and re-delivery) are unsuccessful, they might be returned to you "somewhere."  You must write a separate process, in some language-of-choice, that will look through the "in-basket" of the dead-letter user and attempt to harvest any failed-delivery notifications that might be there.

As an aside, be wary when you design this process!  In the real world of the sometimes-hostile Internet, "failed delivery notifications" can be spoofed, e.g. in an attempt to shut-down a legitimate mailbox.  (It's also sometimes used as a way to get your name taken off a junk-mail list.)  You need to include some recognizable-to-you metadata in the outgoing message that will allow you to authenticate it upon return.  You need to be able to recognize that "this is a piece of mail that I actually sent," and that "the send-to address has not been tampered with."

Most systems are designed so that mailings are sent only to e-mail addresses that have been tested in some way.  For instance, by sending out an e-mail to that address with a "click me" link.  Only if the user does actually click on that link will we assume that the e-mail address is probably good.  Nevertheless we must be prepared that it may one day cease to be "good."  ("Especially in today's economy" ... but that's another story, eh?)

Participant
November 4, 2009

You're definitely right that the NDR won't come back unless either the target mail server issues it, or your SMTP host returns the mail as undeliverable.  But what I'd like to do is set up some way to be notified if CF8 dumps a message in the Undeliverable folder (for whatever reason).  In my environment, it often happens when the CF server has network difficulty in connecting to the SMTP server.  It can go a month with zero problems, and then have a terrible few days with hundreds of valid messages being dumped for connectivity problems.  But if I don't check the folder...

So, does anyone know of a way to monitor the Undeliverable folder and send out a notification message? Of course, this could degenerate into an infinite loop if the network issues persist, but I'll cross that bridge when I figure out if some sort of notification is possible at all.

Inspiring
November 4, 2009

cfdirectory should get you started.

Ken_Ford_-_ACP-QFo4AB
Inspiring
August 8, 2009

Use the failto attribute of cfmail

http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_m-o_01.html#2355015

Address to which mailing systems should send delivery failure notifications. Sets the mail envelope reverse-path value.

Ken Ford
Adobe Community Expert - Dreamweaver/ColdFusion
Adobe Certified Expert - Dreamweaver CS4
Adobe Certified Expert - ColdFusion 8
Fordwebs, LLC
http://www.fordwebs.com
http://www.cfnoob.com

Participant
August 8, 2009

Thank you for the information. I have been trying the failto attribute the whole day, but never received a notification when I send to bad or unreal emails.

Any thoughts?

Ken_Ford_-_ACP-QFo4AB
Inspiring
August 8, 2009

I'm pretty sure it has to receive a bounce from a real mail server.

Ken Ford
Adobe Community Expert - Dreamweaver/ColdFusion
Adobe Certified Expert - Dreamweaver CS4
Adobe Certified Expert - ColdFusion 8
Fordwebs, LLC
http://www.fordwebs.com
http://www.cfnoob.com