MACROMEDIA COLDFUSION 5-DEVELOPING Develop Manual page 331

Table of Contents

Advertisement

Handling POP Mail
3
4
This code retrieves the message headers and stores them in a
called Sample.
The ColdFusion function
HTML, such as the < and > signs that can surround detailed e-mail address
information, with escaped characters such as
In addition, you can process the date returned by
accepts an argument for converting POP date/time objects into a CFML date-time
object.
For information on these ColdFusion functions, see the CFML Reference.
You can reference any of these columns in a
shows.
<cfoutput>
<h2>This example retrieves message header information:</h2>
<cfpop server="mail.company.com"
username=#myusername#
password=#mypassword#
action="GetHeaderOnly"
name="Sample">
<cfoutput query="Sample">
MessageNumber: #HTMLEditFormat(Sample.messageNumber)# <br>
To: #HTMLEditFormat(Sample.to)# <br>
From: #HTMLEditFormat(Sample.from)# <br>
Subject: #HTMLEditFormat(Sample.subject)# <br>
Date: #HTMLEditFormat(Sample.date)#<br>
Cc: #HTMLEditFormat(Sample.cc)# <br>
ReplyTo: #HTMLEditFormat(Sample.replyTo)# <br><br>
</cfoutput>
</body>
</html>
Change the following line so that it refers to a valid POP mail server, as well as a
valid user name and password:
<cfpop server="mail.company.com"
username=#username#
password=#password#
Save the file as
hdronly.cfm
in the ColdFusion Studio Browse tab or your Web browser.
#ParseDateTime(queryname.date, "POP")#
#HTMLCodeFormat(queryname.from)#
#HTMLCodeFormat(queryname.messageNumber)#
</cfoutput>
in
under the Web root directory and view it
myapps
replaces characters that have meaning to
HTMLEditFormat
&lt;
cfoutput
query result set
cfpop
and
.
&gt;
with
cfpop
ParseDateTime
tag, as the following example
311
, which

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 5

Table of Contents