SmtpNetworkElement.EnableSsl Property

.NET Framework (current version)
 

Gets or sets whether SSL is used to access an SMTP mail server. The default value is false.

Namespace:   System.Net.Configuration
Assembly:  System (in System.dll)

[ConfigurationPropertyAttribute("enableSsl", DefaultValue = false)]
public bool EnableSsl { get; set; }

Property Value

Type: System.Boolean

true indicates that SSL will be used to access the SMTP mail server; otherwise, false.

The EnableSsl property indicates if SSL is used to access an SMTP mail server. The SmtpClient class only supports the SMTP Service Extension for Secure SMTP over Transport Layer Security as defined in RFC 3207. In this mode, the SMTP session begins on an unencrypted channel, then a STARTTLS command is issued by the client to the server to switch to secure communication using SSL. See RFC 3207 published by the Internet Engineering Task Force (IETF) for more information.

An alternate connection method is where an SSL session is established up front before any protocol commands are sent. This connection method is sometimes called SMTPS and by default uses port 465. This alternate connection method using SSL is not currently supported.

.NET Framework
Available since 4.0
Return to top
Show: