Receiving e-mail messages
797
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.
If a message is not delivered because of an error, ColdFusion writes it to this directory:
•
In Windows: \CFusionMX\Mail\UnDelivr
•
On UNIX: /opt/coldfusionmx/mail/undelivr
The error log entry that corresponds to the undelivered message contains the name of the file
written to the UnDelivr (or undelivr) directory.
For more information about the mail logging settings in the ColdFusion MX Administrator, see
Configuring and Administering ColdFusion MX
.
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
(
), 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
on 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.
For more information on
cfpop
syntax and variables, see
CFML Reference
.
Using cfpop
Use the following steps to add POP mail to your application.
To implement the cfpop tag in your application:
1
Choose the mailboxes to access within your ColdFusion application.
2
Determine which mail message components you must process: message header, message body,
attachments, and so on.
3
Decide whether you must store the retrieved messages in a database.
Содержание COLDFUSION MX 61-DEVELOPING COLDFUSION MX
Страница 1: ...Developing ColdFusion MX Applications...
Страница 22: ...22 Contents...
Страница 38: ......
Страница 52: ...52 Chapter 2 Elements of CFML...
Страница 162: ......
Страница 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Страница 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Страница 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Страница 266: ......
Страница 314: ...314 Chapter 14 Handling Errors...
Страница 344: ...344 Chapter 15 Using Persistent Data and Locking...
Страница 349: ...About user security 349...
Страница 357: ...Security scenarios 357...
Страница 370: ...370 Chapter 16 Securing Applications...
Страница 388: ...388 Chapter 17 Developing Globalized Applications...
Страница 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Страница 410: ......
Страница 426: ...426 Chapter 19 Introduction to Databases and SQL...
Страница 476: ...476 Chapter 22 Using Query of Queries...
Страница 534: ...534 Chapter 24 Building a Search Interface...
Страница 556: ...556 Chapter 25 Using Verity Search Expressions...
Страница 558: ......
Страница 582: ...582 Chapter 26 Retrieving and Formatting Data...
Страница 668: ......
Страница 734: ...734 Chapter 32 Using Web Services...
Страница 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Страница 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Страница 788: ......
Страница 806: ...806 Chapter 35 Sending and Receiving E Mail...