Adobe COLDFUSION 9 Manual page 1207

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

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
2
Determine which mail message components you must process: message header, message body, attachments, and
so on.
Decide whether you must store the retrieved messages in a database.
3
Decide whether to delete messages from the POP server after you retrieve them.
4
5
Incorporate the cfpop tag in your application and create a user interface for accessing a mailbox.
Build an application page to handle the output. Retrieved messages can include characters that do not display
6
properly in the browser.
You use the
tag with the HTMLCodeFormat and HTMLEditFormat functions to control output to the
cfoutput
browser. These functions convert characters with special meanings in HTML, such as the less than (<), greater than
(>), and ampersand (&) symbols, into HTML-escaped characters, such as &lt;, &gt;, and &amp;. The
tag also surrounds the text in a
The cfpop query variables
Like any ColdFusion query, each
The total number of records returned by the query.
RecordCount
A list of the headings of the columns that the query returns.
ColumnList
The current row of the query that
CurrentRow
The query includes one variable that the
of the e-mail message file.
You can reference these properties in a
attribute of
:
cfpop
<cfoutput>
This operation returned #Sample.RecordCount# messages.
</cfoutput>
Handling POP mail
You use cfpop tag to manage mail. You can specify the messages to act on. You can get message headers, messages, and
attachments, and you can delete messages.
Specifying the message or messages
For all cfpop actions, you can tell the tag to perform the action on all messages, or to do it on selected messages. To
operate on all messages, for example to get all message headers, do not specify a
operate on specific messages, for example, to delete three selected messages, specify a
with a comma-delimited list of messages to act on.
Retrieving message headers
To retrieve message headers without getting the messages, specify
Whether you use
to retrieve the header or the entire message, ColdFusion returns a query object that contains
cfpop
one row for each message in the specified mailbox. you specify the query object name in the
The query has the following fields:
• date
• from
tag block.
pre
query returns variables that provide information about the record:
cfpop
, or
cfoutput
tag does not return: the UID variable contains the unique identifier
cfquery
tag by prefixing the query variable with the query name in the
cfoutput
Last updated 8/5/2010
in a query-driven loop, is processing.
cfloop
messageNumber
messageNumber
action="GetHeaderOnly"
1202
HTMLCodeFormat
name
or
attribute. To
UID
or
attribute
UID
in the cfpop tag.
tag
attribute.
cfpop
name

Advertisement

Table of Contents
loading

Table of Contents