MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual page 803

Developing coldfusion mx applications
Table of Contents

Advertisement

To retrieve all parts of a message, including attachments:
Create a ColdFusion page with the following content:
1
<html>
<head>
<title>POP Mail Message Attachment Example</title>
</head>
<body>
<h2>This example retrieves message header,
body, and all attachments:</h2>
<cfpop server="mail.company.com"
username=#myusername#
password=#mypassword#
action="GetAll"
attachmentpath="c:\temp\attachments"
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>
Attachments: #HTMLEditFormat(Sample.Attachments)# <br>
Attachment Files: #HTMLEditFormat(Sample.AttachmentFiles)# <br>
<br>
Body:<br>
#Sample.body# <br>
<br>
Header:<br>
HTMLCodeFormat(Sample.header)# <br>
<hr>
</cfoutput>
</body>
</html>
Edit the following lines so that they refer to valid values for your POP mail server, username,
2
and password:
<cfpop server="mail.company.com"
username=#myusername#
password=#mypassword#
Handling POP mail
803

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents