Avg. Rating 5.0

Problem

I want to add a priority status for compatible email clients when using CFMAIL.

Solution

ColdFusion 4.5 introduced the child tag CFMAILPARAM allowing you to add mail headers to a message but ColdFusion 8 changed priority into an attribute of CFMAIL.

Detailed explanation

ColdFusion 4.5 introduced the child tag CFMAILPARAM allowing you to add attachments and mail headers, including priority, to a message:

<cfmail from="fromaddress" to="toaddress" subject="mail
subject">

<cfmailparam name="priority" value="high" />

Body

</cfmail>


ColdFusion 8 changed this a little. The above code is still valid for adding a priority, but 'priority' is now an attribute in the CFMAIL tag. The values the priority attribute can accept have also been extended to allow integer values 1-5, 1 being the highest priority.

<cfmail from="fromaddress" to="toaddress" subject="mail subject"
priority="1">

Body

</cfmail>

The primary advantage of this change, I believe, is simply that it is cleaner to read.

ColdFusion 8 also added useSSL and useTLS attributes to CFMAIL

 


+
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

Report abuse

Related recipes