Chapter 13: Sending and Receiving Email
211
Advanced Sending Options
The ColdFusion implementation of SMTP mail uses a spooled architecture. This
means that when a CFMAIL tag is processed in an application page, the messages
generated are not sent immediately. Instead, they are spooled to disk and processed in
the background. This architecture has two distinct advantages:
1.
End users of your application are not required to wait for SMTP processing to
complete before a page returns to them. This is especially useful when a user
action causes more than a handful of messages to be sent.
2.
Messages sent using CFMAIL are delivered reliably, even in the presence of
unanticipated events like power outages or server crashes.
In most cases, spooled messages are processed immediately by ColdFusion and
delivery occurs almost instantly. If, however, ColdFusion is either extremely busy or
has a large existing queue of messages, delivery could occur some time after the
request is submitted.
Sending mail as HTML
Most newer Internet mail applications are capable of reading and interpreting HTML
code in a mail message. The CFMAIL tag allows you to specify the message type as
HTML. The TYPE attribute, which only accepts HTML as an argument, informs the
receiving email client that the message has embedded HTML tags that need to be
processed. This feature is only useful when sending messages to mail clients that
understand HTML.
Error logging and undelivered messages
All errors that occur during the processing of SMTP messages are logged to the file
errors.log
in the ColdFusion log directory. Error 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. The error log entry corresponding to the
undelivered message contains the name of the file written to the
undelivr
directory.
See Administering ColdFusion Server for more information about the mail logging
settings in the ColdFusion Administrator.
Receiving Email Messages
CFPOP, the Post Office Protocol tag, expands the ColdFusion developer’s ability to add
Internet mail client features and email consolidation to applications. While a
conventional mail client provides an adequate interface for personal mail, there are
many cases where an alternative interface to some mailboxes is desirable. CFPOP is a
tool to develop targeted mail clients to suit the specific needs of a wide range of
applications.
Summary of Contents for COLDFUSION 4.5-DEVELOPING WEB
Page 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Page 14: ...xiv Developing Web Applications with ColdFusion...
Page 26: ...xxvi Developing Web Applications with ColdFusion...
Page 34: ...8 Developing Web Applications with ColdFusion...
Page 70: ...44 Developing Web Applications with ColdFusion...
Page 84: ...58 Developing Web Applications with ColdFusion...
Page 114: ...88 Developing Web Applications with ColdFusion...
Page 148: ...122 Developing Web Applications with ColdFusion...
Page 174: ...148 Developing Web Applications with ColdFusion...
Page 208: ...182 Developing Web Applications with ColdFusion...
Page 244: ...218 Developing Web Applications with ColdFusion...
Page 274: ...248 Developing Web Applications with ColdFusion...
Page 288: ...262 Developing Web Applications with ColdFusion...
Page 300: ...274 Developing Web Applications with ColdFusion...
Page 350: ...324 Developing Web Applications with ColdFusion...
Page 362: ...336 Developing Web Applications with ColdFusion...