Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Download emails with attachment from POP3 with Visual C++

Posted on 2000-03-14
Medium Priority
Last Modified: 2011-09-20
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
Question by:cangodel
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
LVL 14

Expert Comment

ID: 2618583
Do you means, that you want send EMail
with attached file? See full example in

Author Comment

ID: 2620589
Edited text of question.

Author Comment

ID: 2620594
Edited text of question.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 14

Expert Comment

ID: 2620903
In example, that i point out, there is
an example of reading (with help of mapi) message only.

Author Comment

ID: 2624998
Edited text of question.
LVL 14

Expert Comment

ID: 2625038

Accepted Solution

sylphe earned 220 total points
ID: 2629119
hi all,

PJ Naughter done a lot for us :


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;

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

Author Comment

ID: 2629315
Adjusted points from 50 to 55

Author Comment

ID: 2629316

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question