User Guide
Chapter 13: Sending and Receiving Email 213
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"
USERNAME=#username#
PASSWORD=#password#
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>