Gets or sets the SSL connection type (POP3/IMAP4/Exchange Web Service/WebDAV) for mail server.
[Visual Basic] Public Property SSLType As SSLConnectType
[C#] public SSLConnectType SSLType {get; set;}
[C++] public: __property SSLConnectType get_SSLType(); public: __property void set_SSLType(SSLConnectType);
[JScript] public function get SSLType() : SSLConnectType; public function set SSLType(SSLConnectType);
Property Value
Remarks
SSL/TLS Connection
SSL connection encrypts data between the POP3 & IMAP4 component and mail server to protects user, password and email content in TCP/IP level. Now this technology is commonly used and many email servers are deployed with SSL such as gmail. The mail server usually deploys SSL on another port( POP3 on 995 or other port, IMAP4 on 993 or other port ), you may query it from your server administrator) directly. There are two ways to deploy SSL/TLS on POP3/IMAP4 server:
TLS 1.2 Encryption
TLS is the successor of SSL, EAGetMail supports SSL 3.0/TLS1.0 - 1.2 very well. In EAGetMail, ConnectTLS doesn't mean TLS encryption, it means TLS command POP3/IMAP protocol.
You don't have to set any property to enable TLS 1.2 encryption. If your server requires TLS 1.2 encryption, TLS 1.2 encryption is used automatically with SSLConnectType.ConnectTLS, SSLConnectType.ConnectSSL or SSLConnectType.ConnectSSLAuto.
To enable TLS 1.2 on Windows 2008/2008 R2/7, please install this update:
https://www.microsoft.com/security/blog/2017/07/20/tls-1-2-support-added-to-windows-server-2008/
For Exchange Web Service/WebDAV, please always set SSLConnectType.ConnectSSLAuto
Example
[C# - SSL/TLS Setting] //connect pop3 server by normal TCP/IP without SSL connection MailServer oServer = new MailServer("myserveraddress", "myuser", "mypassword", false, ServerAuthType.AuthLogin, ServerProtocol.Pop3); //connect imap4 server by normal TCP/IP without SSL connection MailServer oServer = new MailServer("myserveraddress", "myuser", "mypassword", false, ServerAuthType.AuthLogin, ServerProtocol.Imap4 ); //connect pop3 server by SSL connection on default port(995) MailServer oServer = new MailServer("myserveraddress", "myuser", "mypassword", true, ServerAuthType.AuthLogin, ServerProtocol.Pop3); //connect imap4 server by SSL connection on default port(993) MailServer oServer = new MailServer("myserveraddress", "myuser", "mypassword", true, ServerAuthType.AuthLogin, ServerProtocol.Imap4 ); //connect pop3 server by SSL connection on anther port(777) MailServer oServer = new MailServer("myserveraddress", "myuser", "mypassword", true, ServerAuthType.AuthLogin, ServerProtocol.Pop3); oServer.Port = 777; //connect imap4 server by SSL connection on anther port(778) MailServer oServer = new MailServer("myserveraddress", "myuser", "mypassword", true, ServerAuthType.AuthLogin, ServerProtocol.Pop3); oServer.Port = 778; // Exchange Web Service MailServer oServer = new MailServer("myserveraddress", "myuser", "mypassword", false, ServerAuthType.AuthLogin, ServerProtocol.ExchangeEWS); // Exchange WebDAV MailServer oServer = new MailServer("myserveraddress", "myuser", "mypassword", false, ServerAuthType.AuthLogin, ServerProtocol.ExchangeWebDAV); // Exchange Web Service SSL MailServer oServer = new MailServer("myserveraddress", "myuser", "mypassword", true, ServerAuthType.AuthLogin, ServerProtocol.ExchangeEWS); // Exchange WebDAV SSL MailServer oServer = new MailServer("myserveraddress", "myuser", "mypassword", true, ServerAuthType.AuthLogin, ServerProtocol.ExchangeWebDAV); // Retrieve email by SSL connection with STARTTLS or TLS command switching // POP3 TLS MailServer oServer = new MailServer("myserveraddress", "myuser", "mypassword", true, ServerAuthType.AuthLogin, ServerProtocol.Pop3); oServer.Port = 110; oServer.SSLType = SSLConnectType.ConnectTLS; // IMAP4 STARTTLS MailServer oServer = new MailServer("myserveraddress", "myuser", "mypassword", true, ServerAuthType.AuthLogin, ServerProtocol.Imap4); oServer.Port = 143; oServer.SSLType = SSLConnectType.ConnectTLS;
[VB - SSL/TLS Setting] ' Retrieve email by normal TCP/IP without SSL connection ' POP3 Dim oServer As New MailServer("myserveraddress", "myuser", "mypassword", _ False, ServerAuthType.AuthLogin, ServerProtocol.Pop3) ' IMAP4 Dim oServer As New MailServer("myserveraddress", "myuser", "mypassword", _ False, ServerAuthType.AuthLogin, ServerProtocol.Imap4) ' Retrieve email over SSL connection with direct SSL. ' POP3 SSL Dim oServer As New MailServer("myserveraddress", "myuser", "mypassword", _ True, ServerAuthType.AuthLogin, ServerProtocol.Pop3) oServer.Port = 995 ' IMAP4 SSL Dim oServer As New MailServer("myserveraddress", "myuser", "mypassword", _ True, ServerAuthType.AuthLogin, ServerProtocol.Imap4) oServer.Port = 993 ' Retrieve email by SSL connection with STARTTLS or TLS command switching ' POP3 TLS Dim oServer As New MailServer("myserveraddress", "myuser", "mypassword", _ True, ServerAuthType.AuthLogin, ServerProtocol.Pop3) oServer.Port = 110 oServer.SSLType = SSLConnectType.ConnectTLS ' IMAP4 STARTTLS Dim oServer As New MailServer("myserveraddress", "myuser", "mypassword", _ True, ServerAuthType.AuthLogin, ServerProtocol.Imap4) oServer.Port = 143 oServer.SSLType = SSLConnectType.ConnectTLS ' Exchange WebDAV Dim oServer As New MailServer("myserveraddress", _ "myuser", "mypassword", False, _ ServerAuthType.AuthLogin, ServerProtocol.ExchangeWebDAV) ' Exchange Web Service SSL Dim oServer As New MailServer("myserveraddress", _ "myuser", "mypassword", True, _ ServerAuthType.AuthLogin, ServerProtocol.ExchangeEWS) ' Exchange WebDAV SSL Dim oServer As New MailServer("myserveraddress", _ "myuser", "mypassword", True, _ ServerAuthType.AuthLogin, ServerProtocol.ExchangeWebDAV)
[C++/CLI - SSL/TLS Setting] // Retrieve email by normal TCP/IP without SSL connection // POP3 MailServer ^oServer = gcnew MailServer("myserveraddress", "myuser", "mypassword", ServerProtocol::Pop3); // IMAP4 MailServer ^oServer = gcnew MailServer("myserveraddress", "myuser", "mypassword", ServerProtocol::Imap4); // Retrieve email over SSL connection with direct SSL. // POP3 SSL MailServer ^oServer = gcnew MailServer("myserveraddress", "myuser", "mypassword", ServerProtocol::Pop3); oServer->SSLConnection = true; oServer->Port = 995; // IMAP4 SSL MailServer ^oServer = gcnew MailServer("myserveraddress", "myuser", "mypassword", ServerProtocol::Imap4); oServer->SSLConnection = true; oServer->Port = 993; // Retrieve email by SSL connection with STARTTLS or TLS command switching // POP3 TLS MailServer ^oServer = gcnew MailServer("myserveraddress", "myuser", "mypassword", ServerProtocol::Pop3); oServer->SSLConnection = true; oServer->Port = 110; oServer->SSLType = SSLConnectType::ConnectTLS; // IMAP4 STARTTLS MailServer ^oServer = gcnew MailServer("myserveraddress", "myuser", "mypassword", ServerProtocol::Imap4); oServer->SSLConnection = true; oServer->Port = 143; oServer->SSLType = SSLConnectType::ConnectTLS; // Exchange WebDAV MailServer ^oServer = gcnew MailServer("myserveraddress", "myuser", "mypassword", false, ServerAuthType.AuthLogin, ServerProtocol::ExchangeWebDAV); // Exchange Web Service SSL MailServer ^oServer = gcnew MailServer("myserveraddress", "myuser", "mypassword", true, ServerAuthType.AuthLogin, ServerProtocol::ExchangeEWS); // Exchange WebDAV SSL MailServer ^oServer = gcnew MailServer("myserveraddress", "myuser", "mypassword", true, ServerAuthType.AuthLogin, ServerProtocol::ExchangeWebDAV);
See Also
User Authentication and SSL/TLS Connection
MailClient.Connect Method
Online Tutorials
Read Email over SSL/TLS Connection in C# - Tutorial
Read Email from Gmail Account in C# - Tutorial
Read Email from Yahoo Account in C# - Tutorial
Read Email from Hotmail Account in C# - Tutorial
Read Email over SSL/TLS Connection in VB.NET - Tutorial
Read Email from Gmail Account in VB.NET - Tutorial
Read Email from Yahoo Account in VB.NET - Tutorial
Read Email from Hotmail Account in VB.NET - Tutorial
Read Email over SSL/TLS Connection C++/CLI - Tutorial
Read Email from Gmail Account in C++/CLI - Tutorial
Read Email from Yahoo Account in C++/CLI - Tutorial
Read Email from Hotmail Account in C++/CLI - Tutorial