Personal tools
Home Webmaster Resources ColdFusion Sending HTML e-mails with ColdFusion

Sending HTML e-mails with ColdFusion

Sending an HTML formatted email using ColdFusion is very similar to sending a plain text email.  You only need to take note of the type attribute of the cfmail tag, as in the following example:

<cfmail to="person1@people.com"
    from="person2@people.com"
    subject="You are a great person"
    type="HTML" >

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>

<title>You are a great person</title>
   
<style>
   
    body { font-family: verdana; }
    p { font-size: 12px; }
    div { font-size: 10px; }
   
</style>

</head>
<body>

<p>You really are a great person!</p>

</body>
</html>

</cfmail>

Need assistance with your project? Universal Web Services can help.
Contact us to request a quote.