Skip to content

Instantly share code, notes, and snippets.

@bennadel
Created March 25, 2014 11:17
GMail Seems To Ignore The Return-Path Header Defined By The CFMail FailTo Attribute
<cfmailparam
name="return-path"
value="failto@mydomain.com"
/>
<!--- Set up the SMTP server settings. --->
<cfset smtpSettings = {
server="smtp.gmail.com",
username="ben@bennadel.com",
password="****************",
port="465",
usessl="true"
} />
<!---
Send out the email to a non-existent address. Here, we are
going to use a personal GMail account in conjunction with
the ReplyTo and FailTo email headers.
--->
<cfmail
to="nat@natalie-gets-naughty.com"
from="ben+from@bennadel.com"
replyto="ben+replyto@bennadel.com"
failto="ben+failto@bennadel.com"
subject="CFMail FailTo Test"
type="html"
attributecollection="#smtpSettings#">
<p>
This is a CFMail FailTo Test
</p>
<p>
To: nat@natalie-gets-naughty.com
</p>
<p>
ReplyTo: ben+replyto@bennadel.com
</p>
<p>
FailTo: ben+failto@bennadel.com
</p>
</cfmail>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment