Chapter 13: Sending and Receiving Email
Handling POP Mail
This section gives an example of each of the following usages:
Retrieving only message headers
Retrieving a message body
Retrieving attachments
Deleting messages
Returning only message headers
The header includes:
DATE
FROM
MESSAGENUMBER
REPLYTO
SUBJECT
CC
TO
To retrieve only the message header:
1.
Create a new file in Studio.
2.
Modify the file so that it appears as follows:
<HTML>
<HEAD>
<TITLE>POP Mail Message Header Example</TITLE>
</HEAD>
<BODY>
<H2>This example retrieves message
header information:</H2>
<CFPOP SERVER="mail.company.com"
<CFOUTPUT QUERY="Sample">
USERNAME=#username#
PASSWORD=#password#
ACTION="GetHeaderOnly"
NAME="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>
213
Need help?
Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?
Questions and answers