MailServer.SSLType Property


Gets or sets the SSL connection type (POP3/IMAP4/Exchange Web Service/WebDAV) for mail server.

[Visual Basic 6.0]
Public Property Get SSLType() As Long
Public Property Let SSLType(newVal As Long) 
[Visual C++]
public: get_SSLType(LONG* pVal);
public: put_SSLType(LONG newVal);

Property Value

One of the following values.
Const ConnectSSLAuto = 0 'Specifies that the mail client selects the TLS/SSL SSL automatically (recommended).
Const ConnectSSL = 1 'Specifies that the mail server deploys SSL connection directly..
Const ConnectTLS = 2 'Specifies that that the mail server uses TLS to switch SSL channel on normal port.

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 ConnectTLS, ConnectSSL or 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

Const MailServerPop3 = 0
Const MailServerImap4 = 1
Const MailServerEWS = 2
Const MailServerDAV = 3
Const MailServerMsGraph = 4

Const ConnectSSLAuto = 0
Const ConnectSSL = 1
Const ConnectTLS = 2

' Retrieve email by normal TCP/IP without SSL connection
' POP3
Dim oServer As New EAGetMailObjLib.MailServer
oServer.Server = "pop3.emailarchitect.net"
oServer.User = "test@emailarchitect.net"
oServer.Password = "testpassword"
oServer.Protocol = MailServerPop3
oServer.Port = 110

' IMAP4
Dim oServer As New EAGetMailObjLib.MailServer
oServer.Server = "imap4.emailarchitect.net"
oServer.User = "test@emailarchitect.net"
oServer.Password = "testpassword"
oServer.Protocol = MailServerImap4
oServer.Port = 143

' Exchange Web Service
Dim oServer As New EAGetMailObjLib.MailServer
oServer.Server = "exch.emailarchitect.net"
oServer.User = "emailarchitect.net\test"
oServer.Password = "testpassword"
oServer.Protocol = MailServerEWS

' Exchange WebDAV
Dim oServer As New EAGetMailObjLib.MailServer
oServer.Server = "exch.emailarchitect.net"
oServer.User = "emailarchitect.net\test"
oServer.Password = "testpassword"
oServer.Protocol = MailServerDAV

' Retrieve email over SSL connection with direct SSL.
' POP3 SSL
Dim oServer As New EAGetMailObjLib.MailServer
oServer.Server = "pop3.emailarchitect.net"
oServer.User = "test@emailarchitect.net"
oServer.Password = "testpassword"
oServer.Protocol = MailServerPop3
oServer.SSLConnection = True
oServer.Port = 995

' IMAP4 SSL
Dim oServer As New EAGetMailObjLib.MailServer
oServer.Server = "imap4.emailarchitect.net"
oServer.User = "test@emailarchitect.net"
oServer.Password = "testpassword"
oServer.Protocol = MailServerImap4
oServer.SSLConnection = True
oServer.Port = 993

' Retrieve email by SSL connection with STARTTLS or TLS command switching
' POP3 TLS
Dim oServer As New EAGetMailObjLib.MailServer
oServer.Server = "pop3.emailarchitect.net"
oServer.User = "test@emailarchitect.net"
oServer.Password = "testpassword"
oServer.Protocol = MailServerPop3
oServer.SSLConnection = True
oServer.Port = 110
oServer.SSLType = ConnectTLS

' IMAP4 STARTTLS
Dim oServer As New EAGetMailObjLib.MailServer
oServer.Server = "imap4.emailarchitect.net"
oServer.User = "test@emailarchitect.net"
oServer.Password = "testpassword"
oServer.Protocol = MailServerImap4
oServer.SSLConnection = True
oServer.Port = 143
oServer.SSLType = ConnectTLS


' Exchange Web Service SSL
Dim oServer As New EAGetMailObjLib.MailServer
oServer.Server = "exch.emailarchitect.net"
oServer.User = "emailarchitect.net\test"
oServer.Password = "testpassword"
oServer.Protocol = MailServerEWS
oServer.SSLConnection = True

' Exchange WebDAV SSL
Dim oServer As New EAGetMailObjLib.MailServer
oServer.Server = "exch.emailarchitect.net"
oServer.User = "emailarchitect.net\test"
oServer.Password = "testpassword"
oServer.Protocol = MailServerDAV
oServer.SSLConnection = True

User Authentication and SSL/TLS Connection
MailClient.Connect Method

Online Tutorials

Read Email over SSL/TLS Connection in Delphi - Tutorial
Read Email from Gmail Account in Delphi - Tutorial
Read Email from Yahoo Account in Delphi - Tutorial
Read Email from Hotmail Account in Delphi - Tutorial

Read Email over SSL/TLS Connection in VB6 - Tutorial
Read Email from Gmail Account in VB6 - Tutorial
Read Email from Yahoo Account in VB6 - Tutorial
Read Email from Hotmail Account in VB6 - Tutorial

Read Email over SSL/TLS Connection VC++ - Tutorial
Read Email from Gmail Account in VC++ - Tutorial
Read Email from Yahoo Account in VC++ - Tutorial
Read Email from Hotmail Account in VC++ - Tutorial