
1204
DEVELOPING
COLDFUSION 9 APPLICATIONS
Using External Resources
Las
t
upda
te
d 8/5/2010
The HTMLCodeFormat function replaces characters that have meaning in HTML, such as the less than (<) and greater
than (>) signs that can surround detailed e-mail address information, with escaped characters such as
<
and
>
.
In addition, you can process the date returned by cfpop with the ParseDateTime function, which accepts an argument
for converting POP date/time objects into a CFML date-time object.
You can reference any of these columns in a cfoutput tag, as the following example shows:
<cfoutput>
#ParseDateTime(queryname.date, "POP")#
#HTMLCodeFormat(queryname.from)#
#HTMLCodeFormat(queryname.messageNumber)#
</cfoutput>
Retrieving messages
When you use the cfpop tag with
action="GetAll"
, ColdFusion returns the same columns as with
getheaderonly
,
plus the following additional columns:
•
attachments (A tab-delimited list of attachment filenames)
•
attachmentfiles (A tab-delimited list of paths to the attachment files retrieved to the local server, if any. You get the
files only if you specify an
attachmentpath
attribute.)
•
body
•
htmlbody
•
textbody
If the message is multipart, the htmlbody and textbody fields contain the contents of the HTML and plain text parts,
and the body field has the first part in the message. If the message has only one part, the body contains the message,
and either the htmlbody or textbody field, depending on the message type, also has a copy of the message.
Retrieve entire messages
1
Create a ColdFusion page with the following content: