
A Free C# library for connecting to and retrieving
email from a POP3 Mail server.
POP3 Mailservers are probably the most common type of mail server used by ISP’s.
This free mail server client allows developers to retieve email from any mail server the user has access to. The Client currently provides the following functionality:
- Retrieve Messages (With Attachments), in full from a Mail Server.
- Retrieve Messages as a queryable object (Without Attachments) from a Mail Server.
- Delete Messages from a Mail Server.
- Retrieve Headers as queryable objects from a Mail Server.
Please note that the free version is still in development. I’d be grateful for any bugs, but i can make no guarentees as to when they may be fixed. Please contact the author if you are interested in a version which is not time limited. POP3 Client Examples:
1.) Connect to a POP3 Server and get the number of messages on the server |
Spartan.Net.Mail.POP3 pop3 = new Spartan.Net.Mail.POP3();
pop3.Connect(“YOUR.POP3.HERE”, 110, “user”, “password”); int readMessages = 0; pop3.ListMessages(out readMessages, out newMessages); pop3.Disconnect(); |
2.) Connect to a POP3 and Retrieve each message as a string |
Spartan.Net.Mail.POP3 pop3 = new Spartan.Net.Mail.POP3();
pop3.Connect(“YOUR.POP3.HERE”, 110, “USER”, “PASSWORD”); int newMessages = 0; int readMessages = 0; pop3.ListMessages(out readMessages, out newMessages); for (int i = 1; i <= newMessages; i++) { string message = “”; pop3.RetrieveMessage(i, out message); } pop3.Disconnect(); |
Download the Library from here
Please note that all code and examples are provided “as is”, without any kind of warranty or guarentee as to their purpose.