User Guide

Table Of Contents
Receiving e-mail messages 983
widget_master@YourCompany.com.
See you at Widget World 2002!
Jake
</cfmail>
Note: You can combine the two uses of
cfmailparam within the same ColdFusion page. Write a
separate
cfmailparam tag for each header and for each attached file.
Receiving e-mail messages
You create ColdFusion pages to access a Post Office Protocol (POP) server to retrieve e-mail
message information. ColdFusion can then display the messages (or just header information),
write information to a database, or perform other actions.
The
cfpop tag lets you add Internet mail client features and e-mail consolidation to applications.
Although a conventional mail client provides an adequate interface for personal mail, there are
many cases in which an alternative interface to some mailboxes is advantageous. You use
cfpop to
develop targeted mail clients to suit the specific needs of a wide range of applications. The
cfpop
tag does not work with the other major e-mail protocol, Internet Mail Access Protocol (IMAP).
Here are three instances in which implementing POP mail makes sense:
If your site has generic mailboxes that are read by more than one person
(sales@yourcompany.com), it can be more efficient to construct a ColdFusion mail front end to
supplement individual user mail clients.
In many applications, you can automate mail processing when the mail is formatted to serve a
particular purpose; for example, when subscribing to a list server.
If you want to save e-mail messages to a database.
Using
cfpop with your POP server is like running a query on your mailbox contents. You set its
action attribute to retrieve either headers (using the GetHeaderOnly value) or entire messages
(using the
GetAll value) and assign it a name value. You use the name to refer to the record set
that
cfpop returns, for example, when using cfoutput. To access a POP server, you also must
define the
server, username, and password attributes.
Note: If the cfpop tag encounters an error, such as an improperly formatted email message, when
retrieving messages, it tries to ignore the error; it returns empty fields in the result structure and
retrieves any available messages.
For more information on cfpop syntax and variables, see CFML Reference.