Muokkaa

Jaa


SmtpNetworkElement.EnableSsl Property

Definition

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.

Applies to

See also