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

CFPOP & Attachment

Guest
Aug 12, 2013 Aug 12, 2013

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

Views

1.0K

Translate

Translate

Report

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

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Thanks!

Votes

Translate

Translate

Report

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

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

Votes

Translate

Translate

Report

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

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!

Votes

Translate

Translate

Report

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

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

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
Documentation