Advanced sending options

The ColdFusion implementation of SMTP mail uses a spooled architecture. When an application page processes a cfmail tag, the messages that are generated are not sent immediately. Instead, they are spooled to disk and processed in the background. This architecture has two advantages:

You can set how frequently ColdFusion Server checks for spooled mail on messages on the Mail/Mail Logging page of the ColdFusion Administrator Server tab. (The default interval is 60 seconds.) If ColdFusion is extremely busy or has a large existing queue of messages, however, delivery can occur after the spool interval.

Sending mail as HTML

Most newer Internet mail applications are capable of reading and interpreting HTML code in a mail message. The cfmail tag lets you specify the message type as HTML. The type="HTML" attribute (the only valid value; the default is plain text) informs the receiving e-mail client that the message contains embedded HTML tags that must be processed. This feature is useful only when you are sending messages to mail clients that can interpret HTML. Also, you must escape any pound signs in the HTML, such as those used to specify colors, by using two # characters; for example, bgcolor="##C5D9E5".

Error logging and undelivered messages

ColdFusion logs all errors that occur during SMTP message processing to the file mail.log in the ColdFusion log directory. The log entries contain the date and time of the error as well as diagnostic information about why the error occurred.

If a message is not delivered because of an error, ColdFusion writes it to this directory:

The error log entry that corresponds to the undelivered message contains the name of the file written to the UnDelivr (or undelivr) directory.

For more information about the mail logging settings in the ColdFusion Administrator, see Administering ColdFusion MX.

Comments