Solved

Download emails with attachment from POP3 with Visual C++

Posted on 2000-03-14
9
362 Views
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
John
0
Comment
Question by:cangodel
  • 5
  • 3
9 Comments
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 2618583
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
 

Author Comment

by:cangodel
ID: 2620589
Edited text of question.
0
 

Author Comment

by:cangodel
ID: 2620594
Edited text of question.
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 2620903
In example, that i point out, there is
an example of reading (with help of mapi) message only.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:cangodel
ID: 2624998
Edited text of question.
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 2625038
0
 

Accepted Solution

by:
sylphe earned 55 total points
ID: 2629119
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
 

Author Comment

by:cangodel
ID: 2629315
Adjusted points from 50 to 55
0
 

Author Comment

by:cangodel
ID: 2629316
Thanks
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now