I’m getting some new production servers setup at the moment and I have a single ColdFusion application ready to go on one of them.
Part of the setup was of course getting an SMTP server going, to test this I used a simple ColdFusion script with a cfmail tag. I was receiving the email successfully so all was good…until I tested sending emails as part of my application flow, no email
Basically I had something in my project which I didn’t have in my test script, that being multiple failto recipients.
Note the multiple ‘failto’ recipients: failto=”sample1@sample.com,sample2@sample.com”
No emails were being sent with the above code and it wasn’t until I removed the 2nd failto address that I started getting emails.
This seems strange as I can have many to or from recipients, just not failto! The docs say:
"Address to which mailing systems should send delivery failure notifications. Sets the mail envelope reverse-path value."
This doesn’t seem to say either way to me whether you can only have 1 or multiple addresses here.
I tested this on both ColdFusion 7.0.2 and ColdFusion 8 Standard versions running on Windows Server SMTP.
Has anyone successfully sent email with <cfmail> with multiple failto’s?
The failto: (known as return-path) only allows one address as the property is setting the address of the originator of the e-mail, not for reporting purposes. If you need multiple recipients, set up an e-mail group; even though this is not the correct use, it could be used for that.
4.3.1. RETURN-PATH
This field is added by the final transport system that
delivers the message to its recipient. The field is intended
to contain definitive information about the address and route
back to the message’s originator.
Note: The “Reply-To” field is added by the originator and
serves to direct replies, whereas the “Return-Path”
field is used to identify a path back to the origina-
tor.
While the syntax indicates that a route specification is
optional, every attempt should be made to provide that infor-
mation in this field.
taken from:
http://www.w3.org/Protocols/rfc822/
Chris Dawes
August 3rd, 2007
Ah that clears things up, thanks Chris!
Michael Sharman
August 3rd, 2007
Actually no…it doesn’t make sense
>whereas the “Return-Pathâ€
field is used to identify a path back to the origina-
tor.
Um…why would you need that?
Michael Sharman
August 3rd, 2007
One more thing to add. The failto has a limitation.
If we have a pager id in “TO” of and a group id in “FAILTO”, it will fail and will not send mail to pager. Also it will send a System Admin mail to “Group ID” mentioned that:
Reporting-MTA: dns;
Final-Recipient: pagerid@dd.com
Action: failed
Status: 5.7.1
X-Supplementary-Info:
You do not have permission to send to this recipient. For assistance, contact your system administrator.
bg
May 16th, 2008