206
Using ColdFusion with Mail Servers
Adding email to your ColdFusion applications lets you respond automatically to user
requests. You can use email in your ColdFusion applications in many different ways.
These are just a few examples:
Trigger email messages based on users' requests or orders.
Allow users to request and receive additional information or documents
through email.
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 email into your applications. For sending
email, you generally use the Simple Mail Transfer Protocol (SMTP). For receiving mail,
you use the Post Office Protocol (POP) to retrieve email from the mail server. To use
email messaging in your ColdFusion applications you must have access to an SMTP
server and/or a valid POP account.
In your ColdFusion application pages, you use the CFMAIL and CFPOP tags to send
and receive mail respectively. The following sections describe ColdFusion email
features and offer examples of these tags.
Sending Email Messages
Before you set up ColdFusion to send email messages, you must have access to an
SMTP email server. Also, before you run application pages that refer to the email
server, you may want to configure the ColdFusion Administrator to use the SMTP
server so that you don't have to hard-code it in your application.
To configure ColdFusion for email:
1.
Open the Mail page in the ColdFusion Administrator.
2.
In the Mail Server box, enter the address of the SMTP mail server you want
ColdFusion to use.
3.
Normally, you leave the Server Port and Connection Timeout settings at their
default values, unless you need different settings.
4.
Click Apply to save the settings.
5.
To verify server settings, click the Verify button to make sure ColdFusion can
access your mail server.
See Administering ColdFusion Server for more information on the Administrator's mail
settings.
Developing Web Applications with ColdFusion
Need help?
Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?
Questions and answers