tags:

views:

3199

answers:

9

Looking for a POP3 Client for .NET that basically just lets me log into a server and grab all the emails out, and maybe send some. I grabbed Indy.Sockets off of CodePlex and got it running but its throwing errors trying to decode the mail headers. Really anything is fine if it works.

+4  A: 

I use the one of Peter Huber. Has worked quite well for me. (Large amounts of mail > 2k in a batch)

http://www.codeproject.com/KB/IP/Pop3MailClient.aspx

Good luck!

Gabriël
A: 

This client cannot tell if the mail has attachment.

+11  A: 

Hi, as I wrote in the answer to the similar question (Reading Email using Pop3 in C#) the downloading message via the POP3 is the easy part of this task. The parsing of the message is much harder. Handling UNICODE, mangled emails/spams, internationalization issues, code for auto correction of errors which came from Outlook and Thunderbird and testing on big pile of messages is quite time consuming and takes a few months of development time.

I would try the code from the codeproject and if it suits your needs stick with it. In case of too many parsing problem the commercial email component with decent support could be a wise move. I would recommend our Rebex Mail ($149 single dev) but I'm biased. Feel free to browse for you own favorite ;-). At least it will be (in case of any problem) someone who is paid for solving your mail parsing problem.

Martin

Martin Vobr
I don't know why this would be flagged as spam, since he says, "our Rebex Mail". He's stating that he's associated with the product. His very username says "Martin Vobr from Rebex"!
John Saunders
I don't see the point of downwoting either. This answer was accepted (and was probably relevant to the question owner) and I've full disclosure was included as described at http://meta.stackoverflow.com/questions/13295/is-it-appropriate-to-mention-my-product-in-a-stackoverflow-answer and http://meta.stackoverflow.com/questions/10174/using-so-sf-su-to-promote-your-products. Maybe the watchers would be more happy if similar useful answers are posted under the anonymous pseudonyms? :-(
Martin Vobr
More info: This answer is also discussed at meta http://meta.stackoverflow.com/questions/47994/help-this-poor-spammer-out/48031
Martin Vobr
+1  A: 

My open source .NET application BugTracker.NET includes code for a POP3 client and code for parsing MIME. Both are actually borrowed from elsewhere. The MIME code is from SharpMimeTools. But you can see how it all works together in app.

See the files POP3Client.cs, POP3Main.cs, and insert_bug.aspx

Corey Trager
+2  A: 

Check out Lumisoft, it's open source and has many features

Mauricio Scheffer
A: 

Try Mail.dll .NET email component. It's not free, but also not expensive.

It gives you a nice object structure of an entire email message. It has SSL support, POP3, IMAP and SMTP clients for sending and receiving.

using(Pop3 pop3 = new Pop3())
{
    pop3.Connect("mail.host.com");           // Connect to the server 
    pop3.Login("user", "password");          // and login

    foreach(string uid in pop3.GetAll())
    {
        // Receive mail
        IMail mail = new MailBuilder()
   .CreateFromEml(pop3.GetMessageByUID(uid));

  // Write out received mail message
        Console.WriteLine( mail.Subject );
        Console.WriteLine( mail.TextDataString );
    }
    pop3.Close(true); 
}

Please note that this is a commercial product I've created.

You can download it here: http://www.lesnikowski.com/mail.

Pawel Lesnikowski
Why has this been downvoted? He disclosed that it was his own component.
stucampbell
+2  A: 

I've used C#Mail on a project before and it works great. There's very little documentation, but it's easy to discover functionality through Intellisense.

There's two things to keep in mind, however:

  1. The SMTP functionality is incomplete. I don't see this one as much of a problem considering that .NET provides a pretty good SMTP library natively.
  2. The parameter Pop3Client.Available is set to true when it connects, but it doesn't poll to check if the connection remains that way. Thus, if you leave the connection open for a while, the server might disconnect your client, but the Available flag will still be true.
Daniel T.
A: 

C#Mail cited above is GNU GPL. Just a warning so that you make sure GPL will be appropriate for your use, instead of just assuming anything hosted on codeplex is BSD like.

jmd
A: 

Check out ReadyPOP. They have a free version, and the paid version is very inexpensive and includes attachments and SSL support.

Phil Harris