views:

130

answers:

4

I am looking for a .NET Pop3 Email Library. I need be able to read from a Pop3 account where I'll copy all the mail to a local database.

A paid library is fine

I found aspnetPop3 do anyone know if this any good Any help would be a great help

+1  A: 

I can recommend http://www.chilkatsoft.com/ and their mail components.

Not only will it allow you to send out email (plain text/encrypted/html) it also has POP3/IMAP components. There are tonnes of examples in a number of different languages and they are great on support if you should need it.

It also has a 30 day free trial (full funationality)

Jonathan Stanton
+1  A: 

The Indy library was an old favorite of Delphi developers for sockets programming, including SMTP and POP3. It's now been ported to C# and open sourced. You might want to check it out. One word of warning: there isn't a lot of documentation available, but most of the code is quite self-explanatory...

http://www.indyproject.org/SocketsCLR/index.EN.aspx

code4life
+2  A: 

I've tried a few, and settled on Lesnikowski Mail from http://www.lesnikowski.com/mail/. Its object model is a nice fit for how email really works; other libraries I used tried to hide the details but ended up just getting in the way. The Lesnikowski library was robust enough to work across hundreds of installations, talking to many different varieties of POP3 server.

David James
+1  A: 

Our Rebex Secure POP3 might be fine for you. It's actively developed since 2006.

Following code shows how to to download all messages from the POP3 server and save them to the database:

// create client, connect and log in  
Pop3 client = new Pop3();
client.Connect("pop3.example.org");
client.Login("username", "password");

// get message list - full headers  
Pop3MessageCollection messageList = client.GetMessageList();

foreach (Pop3MessageInfo messageInfo in messageList)
{
   // download message
   MailMessage message = client.GetMailMessage(messageInfo.SequenceNumber);

   // store it to the database... 
   // depends on your DB structure. 
   // message.Save(stream) or message.ToByteArray() would be handy
   ...
}

client.Disconnect();
Martin Vobr