Copy link to clipboard
Copied
Hi,
How can i get the attachment files from a email?
I'm using the following code:
<CFPOP ACTION="GETALL"
NAME="Message"
MESSAGENUMBER="#URL.idMsg#"
SERVER="server.mail.test"
USERNAME="test"
PASSWORD="teste"
ATTACHMENTPATH="f:\temp\email\">
But all the times i got the file f:\temp\email\winmail.dat.
How can i get the attachment file like pdf, xml and other?
Thank's
Copy link to clipboard
Copied
See the example in the docs.
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Tags_p-q_08.html
Copy link to clipboard
Copied
There is no exemple that save the attachment. Do you have one exemple to send?
Thanks!
Copy link to clipboard
Copied
If you read through it, there is a link to retrieve emails and save attachments.
http://livedocs.adobe.com/coldfusion/8/htmldocs/email_10.html#1096313
Copy link to clipboard
Copied
Thank you for your help.
I really read the full text, but all i got is a winmail.dat file.
If i use the generateUniqueFilenames i got file like winmail.dat, winmail1.dat, winmail2.dat, winmail3.dat
How can i extract the attachment file from winmail.dat?
Have you made a script that downloads the real attachment using pop?
Can you help?
Thank!
Copy link to clipboard
Copied
I tested with CF9 on Win7. It worked fine. Here's the code:
<cfpop server="mail.server.com" username="myemail@server.com" password="mypassword" action="getAll" name="my_pop3" startrow="1" maxrows="1" attachmentpath="C:\files\">
<cfdump var="#my_pop3#" />
The attachment was downloaded and stored in C:\files\.
Copy link to clipboard
Copied
Not sure why you got .dat file. I sent a PDF; and I received a PDF.