I'm trying to send a compatiable html email --
How do I set my MIME header so that I tell the email client that this is an html email and at the same time, provide a plain text version if the client doesn't support html emails?
Here is what I have so far:
<CFMAIL TO="#email#" FROM="support@aristex.com" SUBJECT="Global Lifeguard discount coupon">
<!--- Embed image via the local file system. --->
<cfmailparam
file="#ExpandPath('#application.imagepath#Email-Header.gif')#"
contentid="header"
disposition="inline"
/>
<cfmailparam
file="#ExpandPath('#application.imagepath#GLG_logo.gif')#"
contentid="logo"
disposition="inline"
/>
<cfmailpart type="html">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
<html xmlns="
<head>
Mime-Version: 1.0 Content-Type: text/html; charset="ISO-8859-1"
</head>
<style>
body,td,a,p,.h{font-family:arial,sans-serif;font-size:small;}
a:link {color:##c02026; }
.footer {font-size:x-small;}
a.footer {font-size:x-small;}
</style>
<body>
<cfoutput>
<table width="600" cellpadding="0" cellspacing="0" border="0"> <tr> <td align="center" bgcolor="##c20803">
<img src="cid:header" alt="E-mail Header" />
<table width="580" cellpadding="15" cellspacing="0" border="0" bgcolor="##ffffff">
<tr><td align="left">
<p>Dear <b>#name#</b>,</p>
<cfif IsDefined("attributes.Personal")>
<cfif trim(attributes.Personal) EQ ""><p>#session.Account.UserName# has invited you to join Global Lifeguard, the first service in Canada that allows you to access your medical records over the internet.</p><cfelse><p>#attributes.Personal#</p></cfif>
<p><b>Use your Service Voucher below to sign up now, and you both get 1 month free!**</b> </p>
<cfelse>
<p>#session.Account.UserName# has invited you to join Global Lifeguard, the first service in Canada that allows you to access your medical records over the internet.</p>
</cfif>
<p>-----------------------------------------------------------------------------------------------------------</p>
<h3>What is Global Lifeguard</h3>
<p>Global Lifeguard is a new health record management system that provides Canadians with secure, web-based access to their medical information.
Up-to-date health records can be accessed by patients, their physicians, and other authorized health care personnel over the Internet from anywhere in
the world, 24 hrs a day, 7 days a week.</p>
<p><b>Member Benefits:</b></p>
<ul>
<li>Secure, 24/7 access to up-to-date health information from anywhere in the world.</li>
<li>All your medical records in one, secure location.</li>
<li>Always have access to your critical information, even in emergency situations and when traveling abroad. </li>
<li>Powerful security features ensure that your information remains completely confidential. </li>
<li>Easily manage the healthcare of loved ones. </li>
<li>Diary functions allow you to keep track of important changes to your health status.</li>
</ul>
<p>To learn more about Global Lifeguard, visit us today at <a href=" target="_blank">
<p> Sincerely,<br />
The Global Lifeguard Team</p>
<p align="right"><img src="cid:logo" alt="Global Lifeguard Logo" /></p>
<p class="footer"><b>Please Note:</b> #session.Account.UserName# requested that this one-time e-mail be sent. If you have any questions about Global Lifeguard, please e-mail us at
<a class="footer" href="mailto:support@globallifeguard.com">support@globallifeguard.com</a>.</p>
<p>-----------------------------------------------------------------------------------------------------------</p>
</td></tr>
<tr>
<td bgcolor="##f0f0f0">
<h3>Here is your one month Global Lifeguard Service Voucher:</h3>
<p><b>Referral Code:</b> #coupon#</p>
<p>This Global Lifeguard Referral Code is only valid for use by #name#. This Global Lifeguard Referral Code expires: <b>#DateFormat(DateAdd('m', 4, Now()),'yyyy/mm/dd')#</b></p>
<br />
<h3>How to redeem your Global Lifeguard Service Voucher:</h3>
<p>1. Please visit <a href="#application.home#/#request.self##xfa.viewSRegister#&edit=1&coupon=#coupon#" target="_blank">
<p>2. When prompted, enter your Global Lifeguard Referral Code and follow the onscreen instructions to complete the registration process.</p>
<p>3. Finalize the registration process by providing your payment information. Once complete, your account will be credited with a one year subscription,
plus one additional month of service.</p>
</td></tr>
<tr><td>
<ul class="footer">
<li>Global Lifeguard Service Vouchers are not for resale, and are not redeemable for cash. </li>
<li>Global Lifeguard Service Vouchers cannot be transferred, and cannot be applied to any existing account. </li>
<li>Sorry, we cannot replace lost Global Lifeguard Service Vouchers. </li>
<li>A valid e-mail address is required to redeem a Global Lifeguard Service Voucher. </li>
<li>This Global Lifeguard Service Voucher Expires 4 Weeks after this e-mail is sent. </li>
</ul>
</td>
</tr>
</table>
<br />
</td>
</tr>
</table>
</cfoutput>
</body>
</html>
</cfmailpart>
</CFMAIL>
How do I set my MIME header so that I tell the email client that this is an html email and at the same time, provide a plain text version if the client doesn't support html emails?
Here is what I have so far:
<CFMAIL TO="#email#" FROM="support@aristex.com" SUBJECT="Global Lifeguard discount coupon">
<!--- Embed image via the local file system. --->
<cfmailparam
file="#ExpandPath('#application.imagepath#Email-Header.gif')#"
contentid="header"
disposition="inline"
/>
<cfmailparam
file="#ExpandPath('#application.imagepath#GLG_logo.gif')#"
contentid="logo"
disposition="inline"
/>
<cfmailpart type="html">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
<html xmlns="
<head>
Mime-Version: 1.0 Content-Type: text/html; charset="ISO-8859-1"
</head>
<style>
body,td,a,p,.h{font-family:arial,sans-serif;font-size:small;}
a:link {color:##c02026; }
.footer {font-size:x-small;}
a.footer {font-size:x-small;}
</style>
<body>
<cfoutput>
<table width="600" cellpadding="0" cellspacing="0" border="0"> <tr> <td align="center" bgcolor="##c20803">
<img src="cid:header" alt="E-mail Header" />
<table width="580" cellpadding="15" cellspacing="0" border="0" bgcolor="##ffffff">
<tr><td align="left">
<p>Dear <b>#name#</b>,</p>
<cfif IsDefined("attributes.Personal")>
<cfif trim(attributes.Personal) EQ ""><p>#session.Account.UserName# has invited you to join Global Lifeguard, the first service in Canada that allows you to access your medical records over the internet.</p><cfelse><p>#attributes.Personal#</p></cfif>
<p><b>Use your Service Voucher below to sign up now, and you both get 1 month free!**</b> </p>
<cfelse>
<p>#session.Account.UserName# has invited you to join Global Lifeguard, the first service in Canada that allows you to access your medical records over the internet.</p>
</cfif>
<p>-----------------------------------------------------------------------------------------------------------</p>
<h3>What is Global Lifeguard</h3>
<p>Global Lifeguard is a new health record management system that provides Canadians with secure, web-based access to their medical information.
Up-to-date health records can be accessed by patients, their physicians, and other authorized health care personnel over the Internet from anywhere in
the world, 24 hrs a day, 7 days a week.</p>
<p><b>Member Benefits:</b></p>
<ul>
<li>Secure, 24/7 access to up-to-date health information from anywhere in the world.</li>
<li>All your medical records in one, secure location.</li>
<li>Always have access to your critical information, even in emergency situations and when traveling abroad. </li>
<li>Powerful security features ensure that your information remains completely confidential. </li>
<li>Easily manage the healthcare of loved ones. </li>
<li>Diary functions allow you to keep track of important changes to your health status.</li>
</ul>
<p>To learn more about Global Lifeguard, visit us today at <a href=" target="_blank">
<p> Sincerely,<br />
The Global Lifeguard Team</p>
<p align="right"><img src="cid:logo" alt="Global Lifeguard Logo" /></p>
<p class="footer"><b>Please Note:</b> #session.Account.UserName# requested that this one-time e-mail be sent. If you have any questions about Global Lifeguard, please e-mail us at
<a class="footer" href="mailto:support@globallifeguard.com">support@globallifeguard.com</a>.</p>
<p>-----------------------------------------------------------------------------------------------------------</p>
</td></tr>
<tr>
<td bgcolor="##f0f0f0">
<h3>Here is your one month Global Lifeguard Service Voucher:</h3>
<p><b>Referral Code:</b> #coupon#</p>
<p>This Global Lifeguard Referral Code is only valid for use by #name#. This Global Lifeguard Referral Code expires: <b>#DateFormat(DateAdd('m', 4, Now()),'yyyy/mm/dd')#</b></p>
<br />
<h3>How to redeem your Global Lifeguard Service Voucher:</h3>
<p>1. Please visit <a href="#application.home#/#request.self##xfa.viewSRegister#&edit=1&coupon=#coupon#" target="_blank">
<p>2. When prompted, enter your Global Lifeguard Referral Code and follow the onscreen instructions to complete the registration process.</p>
<p>3. Finalize the registration process by providing your payment information. Once complete, your account will be credited with a one year subscription,
plus one additional month of service.</p>
</td></tr>
<tr><td>
<ul class="footer">
<li>Global Lifeguard Service Vouchers are not for resale, and are not redeemable for cash. </li>
<li>Global Lifeguard Service Vouchers cannot be transferred, and cannot be applied to any existing account. </li>
<li>Sorry, we cannot replace lost Global Lifeguard Service Vouchers. </li>
<li>A valid e-mail address is required to redeem a Global Lifeguard Service Voucher. </li>
<li>This Global Lifeguard Service Voucher Expires 4 Weeks after this e-mail is sent. </li>
</ul>
</td>
</tr>
</table>
<br />
</td>
</tr>
</table>
</cfoutput>
</body>
</html>
</cfmailpart>
</CFMAIL>