![MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual Download Page 328](http://html1.mh-extra.com/html/macromedia/coldfusion-5-developing/coldfusion-5-developing_develop-manual_3293641328.webp)
308
Chapter 16 Sending and Receiving E-mail
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:
•
End users of your application are not required to wait for SMTP processing to
complete before a page returns to them. This design is especially useful when a
user action causes more than a handful of messages to be sent.
•
Messages sent using
cfmail
are delivered reliably, even in the presence of
unanticipated events like power outages or server crashes.
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.
Summary of Contents for COLDFUSION 5-DEVELOPING
Page 1: ...Macromedia Incorporated Developing ColdFusion Applications MacroMedia ColdFusion 5 ...
Page 58: ...38 Chapter 3 Querying a Database ...
Page 134: ...114 Chapter 7 Updating Your Database ...
Page 210: ...190 Chapter 10 Reusing Code ...
Page 232: ...212 Chapter 11 Preventing and Handling Errors ...
Page 238: ...218 Chapter 12 Using the Application Framework ...
Page 262: ...242 Chapter 12 Using the Application Framework ...
Page 278: ...258 Chapter 13 Extending ColdFusion Pages with CFML Scripting ...
Page 320: ...300 Chapter 15 Indexing and Searching Data ...
Page 336: ...316 Chapter 16 Sending and Receiving E mail ...
Page 374: ...354 Chapter 18 Interacting with Remote Servers ...