Adobe COLDFUSION 9 Manual page 1206

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
<cfmail from="jacob@YourCompany.com"
to="daniel@MyCompany.com"
subject="Requested Files">
<cfmailparam name="Reply-To" value="widget_master@YourCompany.com">
Dan,
Thanks very much for the sending the widget press release and graphic.
I'm now the company's Widget Master and am accepting e-mail at
widget_master@YourCompany.com.
See you at Widget World 2002!
Jake
</cfmail>
Note: You can combine the two uses of
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, in many cases an alternative interface to
some mailboxes is advantageous. You use
range of applications. The
cfpop
Protocol (IMAP).
Here are three instances in which implementing POP mail makes sense:
• If your site has generic mailboxes that more than one person reads (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
with your POP server is like running a query on your mailbox contents. You set its
cfpop
retrieve either headers (using the
value. You use the name to access the recordset that
name
access a POP server, you also must define the
Note: If the
tag encounters an error, such as an improperly formatted e-mail message, when retrieving messages,
cfpop
it tries to ignore the error; it returns empty fields in the result structure and retrieves any available messages.
For more information on the cfpop tag syntax and variables, see the CFML Reference.
Using the cfpop tag
Use the following steps to add POP mail to your application.
Implement the cfpop tag in your application
Choose the mailboxes to access within your ColdFusion application.
1
within the same ColdFusion page. Write a separate
cfmailparam
to develop targeted mail clients to suit the specific needs of a wide
cfpop
tag does not work with the other major e-mail protocol, Internet Mail Access
value) or entire messages (using the
GetHeaderOnly
cfpop
,
server
username
Last updated 8/5/2010
GetAll
returns, for example, when using the cfoutput tag. To
, and
attributes.
password
1201
cfmailparam
attribute to
action
value) and assign it a

Advertisement

Table of Contents
loading

Table of Contents