SecurityProtocol Enumeration |
Namespace: MailBee.Security
Member name | Value | Description | |
---|---|---|---|
Auto | 0 | The most secure protocol supported by the server will be used to authenticate the client and encrypt the data. If the server supports TLS, this protocol will be used; otherwise, less secure protocols such as SSL 2.0 or SSL 3.0 will be tried. However, some servers require the client to specify the protocol and do not support automatic protocol negotiation. Also, it can only select between TLS and SSL but not among TLS versions (TLS 1.0 will be used in case of TLS). For better security, select TLS 1.2 explicitly (provided that the server supports TLS 1.2 as well). | |
Ssl2 | 12 | SSL 2.0 will be used to authenticate the client and encrypt the data. Highly vulnerable! | |
Ssl3 | 48 | SSL 3.0 will be used to authenticate the client and encrypt the data. Highly vulnerable! | |
Tls1 | 192 | TLS 1.0 will be used to authenticate the client and encrypt the data. Somewhat vulnerable but still the best option for .NET 4.0 and earlier. | |
Tls11 | 768 | TLS 1.1 will be used to authenticate the client and encrypt the data. Requires .NET 4.5 or higher. | |
Tls12 | 3072 | TLS 1.2 will be used to authenticate the client and encrypt the data. The highest level of security. Requires .NET 4.5 or higher. |
The security protocol can be set via SslProtocol property of SmtpServer, Pop3, or Imap classes.
Most applications use Auto option, which allows MailBee.NET to communicate with the server using the most secure of the available methods.
If the mail server does not support automatic protocol negotiation (this usually results in getting MailBeeSocketResetException thrown during TLS/SSL negotiation), the developer should mannually specify the protocol to be used (for example Tls1).
![]() |
---|
Newest and most secure versions of TLS (1.1. and 1.2) cannot be picked up automatically. You must explicitly specify them. This, however, requires MailBee.NET.45.dll (MailBee.NET assembly for .NET 4.5 or higher). Earlier versions of .NET Framework support TLS 1.0 only. |