POP3 Features
POP3 is currently the most widely used e-mail protocol. ActiveUp.MailSystem provides a selection of tools designed to provide full access to the features of the POP3 protocol.
Official specifications and standards for POP3 can be found in the following documents:
View Mailbox Size and Message Count
One important feature of POP3 is the ability to check the size of the mailbox and the message count as demonstrated in the code below.
Show C# code
// We instantiate the pop3 client. Pop3Client pop = new Pop3Client();
// Connect to the pop3 client pop.Connect("mail.example.com", "user1@example.com", "userpassword");
// Get the message count Console.WriteLine("Messages: {0}", pop.MessageCount);
Download Full Message or Header Only
For improved performance, message headers can be downloaded to give the user a message preview, in the form of byte arrays, strings, streams or specific objects. This is the exact same feature that MS Outlook and other professional-grade email clients provide in their “preview window.”
You can quickly and easily display just the information required for the user to determine if the message is worth downloading or not. With the proliferation of spam e-mails, this can provide a significant performance improvement.
Show C# code
// We instantiate the pop3 client. Pop3Client pop = new Pop3Client();
// Connect to the pop3 client pop.Connect("mail.example.com", "user1@example.com", "userpassword");
// Get the full message (note that this is not zero based index in POP3) Message message = pop.RetrieveMessageObject(1);
// Get the header only Header header = pop.RetrieveHeaderObject(1);
Secure Authentication
Like the SMTP, NNTP and IMAP4 protocols, ActiveUp.MailSystem handles POP3 authentication very easily. Secure POP encrypts the user name and password whenever the server is accessed in order to protect the user’s account from being hijacked. Here is an ActiveUp.MailSystem secure connection example for a POP3 Client:
Show C# code
// We instantiate the pop3 client. Pop3Client pop = new Pop3Client();
// We connect to the pop3 client pop.Connect("mail.example.com");
// We authenticate securely pop.Authenticate("user1@example.com", "userpassword", SaslMechanism.CramMd5);
|