<cfmail> failto only accepts a single address?

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.

<cfmail to="#to#" from="#from#" subject="my subject" server="#server#" failto="sample1@sample.com,sample2@sample.com">
message body
</cfmail>

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.

failto="sample1@sample.com"

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?

Post a Comment or Leave a Trackback

4 Comments

  1. Chris Dawes
    August 3, 2007 at 4:56 am | Permalink

    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/

  2. August 3, 2007 at 7:48 am | Permalink

    Ah that clears things up, thanks Chris!

  3. August 3, 2007 at 10:42 am | Permalink

    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?

  4. bg
    May 16, 2008 at 9:38 am | Permalink

    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.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*