As mentioned here Ssl (Implicit) smtp servers do the whole operation in an encrypted TCP connection, while Tls (Explicit) smtp servers start a plain text connection, does the hand shaking and then start an encrypted data transferring.
To detect Ssl Type AIM will firstly tries to detect if it is a TLS (Explicit) connection. If not, it will try to connect to server as a Ssl Server, if both fails it will return None as ssl type
public SslMode DetectSslType(string host, string tlsPort, string user, string pass){
var mailer = new MimeMailer(host, tlsPort)
{
User = user,
Password = pass,
AuthenticationMode = AuthenticationType.Base64
};
mailer.SendCompleted += compEvent;
return mailer.DetectSslMode();
}
private void compEvent(object sender, AsyncCompletedEventArgs e)
if (e.UserState != null)
Console.Out.WriteLine(e.UserState.ToString());
if (e.Error != null)
{
MessageBox.Show(e.Error.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else if (!e.Cancelled)
{
MessageBox.Show("Send successfull!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
Wiki: Home
Wiki: How To Detect Tls Support
Wiki: How to Detect if mail server is Tls or Ssl
Wiki: SSL VS TLS