User Guide

310 Chapter 16 Sending and Receiving E-mail
cfpop query variables
Two variables are returned for each cfpop query that provide record number
information:
RecordCount The total number of records returned by the query.
CurrentRow The current row of the query being processed by cfoutput in a
query-driven loop.
You can reference these properties in a cfoutput tag by prefixing the query variable
with the query name in the
name attribute of cfpop:
<cfoutput>
This operation returned #Sample.RecordCount# messages.
</cfoutput>
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
Retrieving only message headers
The header includes the following information. When you use cfpop to get the
header or the entire message, ColdFusion returns the values of each these fields in a
query column, with one record per retrieved message:
date
from
messageNumber
replyTo
subject
cc
to
To retrieve only the message header:
1 Create a new file in ColdFusion Studio.
2 Modify the file so that it appears as follows:
<html>
<head>
<title>POP Mail Message Header Example</title>
</head>
<body>