Not yet rated

Problem

The <cfmail> tag allows an application to specify a to and from email address. The address is formatted as user@domain.com. However, it would be more user friendly for the application to display the name of the person the email came from.

Solution

The <cfmail> tag allows for different formatting options of an email address.

Detailed explanation

The <cfmail> tag allows you to add a name to appear in the to and from fields and the specify the email address within a set of < >'s.


The format of the to and from fields could be FirstName, LastName <user@domain.com>:

<cfmail

to="Peyton Manning <peyton.manning@colts.com>"

from="Tom Brady <tom.brady@patriots.com>"

subject="I need a few pointers..."

>


Now when a user receives email from the application, it will show the name of the user instead of their email address.


 


+
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