ImapSslMode Property
Gets or sets how the component should establish TLS/SSL connection with the mail server.

Namespace: MailBee.ImapMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 11.2.0 build 590 for .NET 4.5
Syntax
public SslStartupMode SslMode { get; set; }

Property Value

Type: SslStartupMode
One of SslStartupMode values specifying if and how the component should establish TLS/SSL connection with the mail server. The default value is Manual which means the connection won't be established in TLS/SSL mode unless the developer manually calls StartTls method.
Remarks

AutodetectPortAndSslMode property may cause MailBee to automatically enable TLS/SSL for some well-known hosts or ports even if SslMode property has its default value.

Note Note
Not all mail servers support TLS/SSL functionality. Also, some servers support only newest TLS versions (see SslProtocol topic for details).
Examples
This sample connects to the mail server on dedicated IMAP4 SSL port 993, logs in the mail account and displays the list of all folders in this account.
// To use the code below, import MailBee namespaces at the top of your code.
using MailBee;
using MailBee.ImapMail;
using MailBee.Security;

// The actual code (put it into a method of your class).
Imap imp = new Imap();
imp.SslMode = SslStartupMode.OnConnect;
imp.Connect("mail.domain.com", 993);
imp.Login("jdoe", "secret");
FolderCollection folders = imp.DownloadFolders();
foreach (Folder imapFolder in folders)
{
    Console.WriteLine(imapFolder.Name);
}
imp.Disconnect();
See Also