Chapter 15: Using External Resources; Sending And Receiving E-Mail - Adobe 38043740 - ColdFusion Standard - Mac Development Manual

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

Chapter 15: Using External Resources

Sending and Receiving E-Mail

You can add interactive e-mail features to your Adobe ColdFusion applications by using the cfmail and cfpop tags.
This complete two-way interface to mail servers makes the ColdFusion e-mail capability a vital link to your users.
Using ColdFusion with mail servers
Adding e-mail to your ColdFusion applications lets you respond automatically to user requests. You can use e-mail in
your ColdFusion applications in many different ways, including the following:
• Trigger e-mail messages based on requests or orders from users.
• Allow users to request and receive additional information or documents through e-mail.
• Confirm customer information based on order entries or updates.
• Send invoices or reminders, using information pulled from database queries.
ColdFusion offers several ways to integrate e-mail into your applications. To send e-mail, you generally use the Simple
Mail Transfer Protocol (SMTP). To receive e-mail, you use the Post Office Protocol (POP) to retrieve e-mail from the
mail server. To use e-mail messaging in your ColdFusion applications, you must have access to an SMTP server, a valid
POP account, or both.
In your ColdFusion application pages, you use the cfmail and cfpop tags to send and receive e-mail, respectively.
How ColdFusion sends mail
The ColdFusion implementation of SMTP mail uses a spooled architecture. If you select to spool mail on the Mail page
in the ColdFusion Administrator, 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:
• 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 the sending of more than a handful of messages.
• Messages sent using
cfmail
or server crashes.
You can set how frequently ColdFusion checks for spooled mail messages on the Mail page in the ColdFusion
Administrator. If ColdFusion is busy or has a large existing queue of messages, however, delivery can occur after the
spool interval.
Some ColdFusion editions have advanced spooling options that let you fine-tune how ColdFusion sends mail. For
more information, see Configuring and Administering ColdFusion.
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.
are delivered reliably, even in the presence of unanticipated events like power outages
Last updated 1/20/2012
1192

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents