Using Pop3Client & ImapClient: is just the .NET default protocol (TLS 1.2) used when connecting to the mail server or all the supported protocols on the client machine? If SslStream is being used then I would guess some variant of AuthenticateAsClient is used to connect. The .NET default can be assumed in that call or protocols can be specified like TLS 1.0, 1.1, 1.2 so the mail server can pick one from the list.
Aspose.Email implements a number of network protocols, for example SMTP, MIME, POP3 and IMAP. Every protocol have its own mechanism to communicate and authenticate. Which protocol shall be used is based on the needs of the user.
For more information regarding Protocols, Please follow the links given below:
Thanks for the response. I’m referring specifically to the Pop3Client and ImapClient classes and the SSL protocol they are using for authentication.
Please find below the sample Code for connecting ImapClient with SSL:
// For complete examples and data files, please go to https://github.com/aspose-email/Aspose.Email-for-.NET // Create an instance of the ImapClient class ImapClient client = new ImapClient("imap.domain.com", 993, "email@example.com", "pwd"); // Set the security mode to implicit client.SecurityOptions = SecurityOptions.SSLImplicit;
Please find below the sample Code for connecting Pop3Client with SSL:
// For complete examples and data files, please go to https://github.com/aspose-email/Aspose.Email-for-.NET // Create an instance of the Pop3Client class Pop3Client client = new Pop3Client(); // Specify host, username and password, Port and SecurityOptions for your client client.Host = "pop.gmail.com"; client.Username = "firstname.lastname@example.org"; client.Password = "your.password"; client.Port = 995; client.SecurityOptions = SecurityOptions.Auto; Console.WriteLine(Environment.NewLine + "Connecting to POP3 server using SSL.");
I really appreciate the detailed response. I believe my answer is in the SecurityOptions setting. I see it can be None, SSLExplicit, SSLImplicit, SSLAuto and Auto. I just can’t tell from the documentation on those settings if it’s trying to negotiate all of the SSL/TLS versions available on the client machine or just one which I would expect to be the .NET default. For example, .NET 4.6 and up I believe defaults to TLS 1.2. Then, if that isn’t supported does the call / connection fail or are several protocols passed to the mail server (1.0, 1.1, 1.2) so the server can pick?
Aspose.Email does not try to communicate with all SSL/TLS versions available. Our components use .NET Framework security classes. So latest version of the .NET Framework provides the latest version of SSL implementation. It is necessary that Server and client must support the same versions of SSL protocol. To set SSL version for client you may use following code:
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;