User Guide

Table Of Contents
Sending e-mail messages 975
To configure ColdFusion for e-mail:
1.
In the ColdFusion MX Administrator, select Server Settings > Mail.
2.
In the Mail Server box, enter the name or IP address of your SMTP mail server.
3.
(Optional) Change the Server Port and Connection Timeout default settings.
4.
Select the Verify Mail Server Connection check box to make sure ColdFusion can access your
mail server.
5.
If your mail server does not use port 25, the default, SMTP port, change the Server Port default
settings.
6.
Depending on your ColdFusion MX edition, the Mail page in the Administrator has additional
options that you can use to configure and optimize ColdFusion mail behavior. Select these as
appropriate.
7.
Click Submit Changes.
ColdFusion saves the settings. The page displays a message indicating success or failure for
connecting to the server.
ColdFusion MX Enterprise edition includes additional mail spooling and delivery features. For
more information on these features, and for information on the Administrators mail settings, see
Configuring and Administering ColdFusion MX.
Sending SMTP e-mail with the cfmail tag
The
cfmail tag provides support for sending SMTP e-mail from within ColdFusion applications.
The
cfmail tag is similar to the cfoutput tag, except that cfmail outputs the generated text as
an SMTP mail message rather than to a page. The
cfmail tag supports all the attributes and
commands that you use with
cfoutput, including query. The following table describes basic
cfmail tag attributes that you might use to send a simple email message. For a complete list of
attributes, see the
cfmail description in CFML Reference.
Attribute Description
subject The subject of the message.
from The e-mail address of the sender.
to The e-mail address of the recipient. Use a comma-delimited list to specify multiple
recipients.
cc (Optional) The e-mail address of a carbon copy recipient. The recipient’s address is
visible to other recipients. Use a comma-delimited list to specify multiple cc
recipients.
bcc (Optional) The e-mail address of a blind carbon copy recipient. The recipient’s
address is not visible to other recipients. Use a comma-delimited list to specify
multiple bcc recipients.