SmtpNetworkElement.EnableSsl Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets whether SSL is used to access an SMTP mail server. The default value is false
.
public:
property bool EnableSsl { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enableSsl", DefaultValue=false)]
public bool EnableSsl { get; set; }
[<System.Configuration.ConfigurationProperty("enableSsl", DefaultValue=false)>]
member this.EnableSsl : bool with get, set
Public Property EnableSsl As Boolean
Property Value
true
indicates that SSL will be used to access the SMTP mail server; otherwise, false
.
- Attributes
Remarks
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.