Pop3 mail attachment

May 31, 2010 at 3:21 AM

Hello Friends,
I am developing an application in C# and pop3 mail client is a part of my application.
The job of Mail client  is to receive emails and to save downloads at some location. I have just downloaded C#Mail library. I want to know does this library work with downloading email attachments?

If somebody can provide example code in which this library has been used it will be much helpful.

Thanks in advance
BR,
Zeeshan 

Coordinator
Jun 4, 2010 at 4:20 PM


Yes,you can download attachment and save it in local disk.

Pop3Client cl = new Pop3Client();
cl.UserName = "myName";
//set other property
Pop3Message mg = cl.GetMessage(1);
Pop3Content ct = mg.Contents[0];
ct.DecodeData("c:\");

regard

Jun 4, 2010 at 8:34 PM
Edited Jun 4, 2010 at 8:54 PM

Hi highty,

Thanks for your reply. One more question i would like to ask. Does this library allow automatic download new email attachments and shows how many new emails are there?

I am trying to use your (MailSample) application which is available on your website with code. This application is working fine but it does not show emails with attachments. Could you please update that sample code. it will be much helpful.

BR,
Zeeshan

Coordinator
Jun 5, 2010 at 1:26 PM

Pop3 protocol is very simple and has no functionality about managing read or not read state.
So,you must implement the functionality by yourself with database or local file..etc.