POP3 over SSL
By using the AdvancedIntellect.Ssl.dll, you can enable the aspNetPOP3.dll to communicate to your POP3 servers over SSL. Download the AdvancedIntellect.Ssl.dll from www.advancedintellect.com/download.aspx . Once you have imported it into your project, you can set a reference to the SSL dll.

To convert your code to support Ssl will only take a few changes. You will simply need to create the Ssl socket, load it into the POP3 object, and possibly change the POP3 port to a SSL port.

Below you will find a code example for enabling SSL. For more information, be sure to check out the AdvancedIntellect.Ssl.chm help file, downloaded with the AdvancedIntellect.Ssl.dll.


POP3 p = new POP3( "mail.example.com", "test@example.com", "test" ); //create and load the ssl socket AdvancedIntellect.Ssl.SslSocket ssl = new AdvancedIntellect.Ssl.SslSocket(); p.LoadSslSocket( ssl ); //rest of the POP3 properties p.LogPath = "c:\\pop3.log"; p.Port = 995; //Standard POP3 Ssl port p.Connect(); int count = p.MessageCount(); Console.WriteLine( count ); //download each of the headers for( int i=0;i<count;i++) { string headers = p.GetHeaders( i ); Console.WriteLine( headers ); } p.Disconnect();


Dim p As New POP3("mail.example.com", "test@example.com", "test") 'create and load the ssl socket Dim ssl As New AdvancedIntellect.Ssl.SslSocket() p.LoadSslSocket(ssl) 'rest of the POP3 properties p.LogPath = "c:\pop3.log" p.Port = 995 'Standard POP3 Ssl port p.Connect() Dim count As Integer = p.MessageCount() Console.WriteLine(count) 'download each of the headers Dim i As Integer For i = 0 To count - 1 Dim headers As String = p.GetHeaders(i) Console.WriteLine(headers) Next i p.Disconnect()