Sending MultiPart Email Messages with ColdFusion

Here is an example of how to send a multipart email message with ColdFusion:


<cfmail subject="MultiPart Email Test" type="text/html" to="you@test.com" from="someone@test.com">
<cfmailpart type="text/plain">
Plain text goes here
</cfmailpart>
<cfmailpart type="text/html">
HTML version goes here
</cfmailpart>
</cfmail>

It's important that you put the text-only version of the message FIRST in the mailpart tag list, otherwise GMail will always display the text-only version of the email message and never display the HTML version of the message!

Comments
Isaac Sunkes's Gravatar Great tip.
# Posted By Isaac Sunkes | 1/4/10 1:38 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact Blog Owner