[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 382
  • Last Modified:

Download emails with attachment from POP3 with Visual C++

Dear Friends,

I already download emails from POP3, but attachments is as a body-part of emails. I want download attachments separatly from email body. How can I do this?

Note for Alex : This mean I want download (read) email body (from POP3 server) seperate from attachment. !!... Not while send it, When I read it. (Not with MAPI, I want it with SMTP/POP3)

Thanks a lot
John
0
cangodel
Asked:
cangodel
  • 5
  • 3
1 Solution
 
AlexVirochovskyCommented:
Do you means, that you want send EMail
with attached file? See full example in
http://support.microsoft.com/support/kb/articles/q171/0/96.asp
0
 
cangodelAuthor Commented:
Edited text of question.
0
 
cangodelAuthor Commented:
Edited text of question.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
AlexVirochovskyCommented:
In example, that i point out, there is
an example of reading (with help of mapi) message only.
0
 
cangodelAuthor Commented:
Edited text of question.
0
 
AlexVirochovskyCommented:
0
 
sylpheCommented:
hi all,

PJ Naughter done a lot for us :

http://indigo.ie/~pjn/pop3.html

Override the GetBody method searching an extension field
( rfc 822 and 1725 http://www.rfc.net)

You'll find that extension by filtering your message body.

Example: (From a mail i received)

..... <- header stuff and first part of the mail

--------------XXXXXXXXXXXXXXXXXXXXX                 <- separator for multipart mail
Content-Type: application/x-zip-compressed;            <- the type of file attached
 name="hello.zip"                                         <- the name of the attached document  :)
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="hello.zip"

UEsDBBQAAAAIAARRZyh2ke4FAwIAAP8EAAAPAAAAdGVzdF9yZXNlYXUuY2x3tZNNb5tAEIbv
SPwHlF6tyiwkJqn2gBfbRcVGMuu4UlShNR43tBgsdlGS/vouXwbbsXLKjZ192Hdm3plvGvHW
2i5OQIuyVLA4 ....               <- binary stuff

The extension could be /x-text, /octet-stream, video/quicktime and so on.

You can find some other by launching explorer -> display -> options -> file type : then you'll find the common extension used on your computer.

Sometime you'll find before your body, it helps to know if there is something attached :

This is a multi-part message in MIME format.

in your body.

I hope it help
0
 
cangodelAuthor Commented:
Adjusted points from 50 to 55
0
 
cangodelAuthor Commented:
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now