I’m writing this to hopefully allow other people to avoid the issues I’ve had with one of the sites I support. This particular client’s business revolves around sending emails so it is obviously important that the end user receive those emails. Spam filters are more and more getting in the way. One thing you have to really think about when sending the email is “What will this email look like to the receiving server?” If you are on domain.com and you send an email using cfmail and the from address is a domain.com address, there is no problem. It’d be like sending that same message through Outlook using a domain.com address and domain.com relay (SMTP) server.
What if you have a form allowing a random user to send an email?
Here’s an example of the TXT record from domain.com:
domain.com 86400 IN TXT "v=spf1 ip4:xx.xx.xx.xx ip4:yy.yy.yy.yy ip4:zz.zz.zz.zz -all"
The first 3 ip addresses would be valid mail servers. The –all says to reject anything that is not one of those 3 ip addresses.
The way around this is to use a cfmailparam tag with a valid email address for domain.com (make an email address if necessary like info@domain.com). Here’s what the resulting code looks like:
<cfmail to="#to#" from="#from#" subject="#subject#" type="html">
<cfmailparam name="sender" value="valid_email@domain.com">
.
.
.
</cfmail>
I hope this helps some people out

Related Articles
No user responded in this post
Leave A Reply