View Full Version : How to send both text and html versions of email with CFMAIL

November 30th, 2010, 01:58 PM
Here is a short example of how to include both the text version of an email and the html version of an email with CFMAIL so that the recipient can view the email in text or html, depending on their email client:

<cfmail to="#toemail#" from="#fromemail#"
subject="Sample CF email with text and HTML formats"

<cfmailpart type="text" wraptext="60">
Congratulations! You have received a sample CF email as text!

<cfmailpart type="html">
<b>Congratulations!</b> You have received a sample CF email as HTML! <br /> <img src="http://hostek.com/images/hosteklogo.png">