Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFPOP & Attachment

Guest
Aug 12, 2013 Aug 12, 2013

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

1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 12, 2013 Aug 12, 2013
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 12, 2013 Aug 12, 2013

There is no exemple that save the attachment. Do you have one exemple to send?

Thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 12, 2013 Aug 12, 2013

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 13, 2013 Aug 13, 2013

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 13, 2013 Aug 13, 2013

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\.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 13, 2013 Aug 13, 2013
LATEST

Not sure why you got .dat file. I sent a PDF; and I received a PDF.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources