Advanced Sending Options

The ColdFusion implementation of SMTP mail uses a spooled architecture. When a cfmail tag is processed in an application page, the messages that are generated are not sent immediately. Instead, they are spooled to disk and processed in the background. This architecture has two distinct 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 some time 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 has embedded HTML tags that need to be processed. This feature is useful only when you are sending messages to mail clients that understand 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

All errors that occur during the processing of SMTP messages are logged 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 on why the error occurred.

All messages not delivered because of an error are written to the \CFusion\Mail\UnDelivr directory on Windows systems and /opt/coldfusion/mail/undelivr on UNIX systems. The error log entry corresponding to the undelivered message contains the name of the file written to the UnDelivr directory.

For more information about the mail logging settings in the ColdFusion Administrator, see Advanced ColdFusion Administration.



Banner.Novgorod.Ru