Click here to Skip to main content
15,891,473 members
Articles / Programming Languages / C#
Article

POP3 Library in C#

Rate me:
Please Sign up or sign in to vote.
1.86/5 (20 votes)
26 Sep 2003 186.7K   4.4K   40   42
Complete POP3 Library with Attachment read and Save option

Introduction

POP3 Library is an implementation of POP3 protocol. This library supports attachments within the messages and uses delegates in C# to provide with all the necessary feedback to the user of the library.

POP3 events from the library are passed to the client application by means of delegates:

C#
public delegate void POP3Error(string errorMsg);
public delegate void 
     POP3MsgRetrivalStatus(int MsgNumber,int MsgSize,int MsgRetsize);
public delegate void POP3Complete();
public delegate void POP3MsgComplete(int MsgNumber,string MsgHeader);

The simple interface provided by the library can be used by any GUI application to get the POP3 messages.

public POP3(string UserName,string Password,string Server,bool DelAfterRead) is the constructor, which accepts the username, password, server, and property to delete the message after read.

A sample application to use the library is provided with this article.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
South Africa South Africa
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralRe: Attachment Pin
Jeffrey Scott Flesher5-Jul-05 9:07
Jeffrey Scott Flesher5-Jul-05 9:07 
GeneralPlease Pin
surya sekhar bhattacharya3-Nov-04 18:04
surya sekhar bhattacharya3-Nov-04 18:04 
GeneralRe: Please Pin
Jeffrey Scott Flesher5-Jul-05 9:09
Jeffrey Scott Flesher5-Jul-05 9:09 
GeneralRe: Attachment Pin
tomstrummer5-Jul-05 4:05
tomstrummer5-Jul-05 4:05 
GeneralRe: Attachment Pin
Jeffrey Scott Flesher5-Jul-05 9:15
Jeffrey Scott Flesher5-Jul-05 9:15 
GeneralDoesn't work in VS 1.0.3705 Pin
virabadrasana14-Nov-03 1:30
virabadrasana14-Nov-03 1:30 
GeneralState Machine locks up Pin
Scott Burgett12-Nov-03 11:47
Scott Burgett12-Nov-03 11:47 
GeneralError in ParseMessage Pin
ottavio828-Oct-03 5:50
ottavio828-Oct-03 5:50 
I have problem with your demo code.

I change pop server because your server in absent.

I use pop3.infinito.it

But i have this error on execution of read mail.

I Use visual studio 2003 In Italian

ParseMessage error:
'103' it is not a valid value for value. The range is 'minimum' and 'maximum'.
at System.Windows.Forms.ProgressBar.set_Value(Int32 value)
at POP3Demo.Form1.Status(Int32 MsgNumber, Int32 MsgSize, Int32 RetrMsgSize)
at PramodSingh.LibPOP3.POP3.ParseMessage()

Sorry for my english. I am ItalianCry | :((


AnswerRe: Error in ParseMessage Pin
coach023-May-07 0:42
coach023-May-07 0:42 
GeneralBug Pin
yetanotherchris29-Sep-03 23:42
yetanotherchris29-Sep-03 23:42 
GeneralRe: Bug Pin
PramodKumarSingh30-Sep-03 18:33
PramodKumarSingh30-Sep-03 18:33 
GeneralGood job Pin
Saikat Sen29-Sep-03 16:49
Saikat Sen29-Sep-03 16:49 
GeneralRe: Good job Pin
malby30-Sep-03 0:50
malby30-Sep-03 0:50 
GeneralRe: Good job Pin
loop0716-Sep-04 16:30
loop0716-Sep-04 16:30 
General:-( Pin
lesnikowski27-Sep-03 13:02
lesnikowski27-Sep-03 13:02 
GeneralRe: :-( Pin
PramodKumarSingh30-Sep-03 18:09
PramodKumarSingh30-Sep-03 18:09 
GeneralRe: :-( Pin
paragme15-Oct-03 4:08
paragme15-Oct-03 4:08 
GeneralRe: :-( Pin
lesnikowski15-Oct-03 10:10
lesnikowski15-Oct-03 10:10 
GeneralRe: :-( Pin
Ed Din ar Qadiyyeh20-Oct-03 15:01
Ed Din ar Qadiyyeh20-Oct-03 15:01 
GeneralRe: :-( Pin
lesnikowski21-Oct-03 10:14
lesnikowski21-Oct-03 10:14 
GeneralRe: :-( Pin
pvialoux25-Aug-04 11:21
pvialoux25-Aug-04 11:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.