SmtpNetworkElement.Password Property

 

Gets or sets the user password to use to connect to an SMTP mail server.

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

[ConfigurationPropertyAttribute("password")]
public string Password { get; set; }

Property Value

Type: System.String

A string that represents the password to use to connect to an SMTP mail server.

Setting DefaultCredentials takes precedence over setting UserName and Password. UserName and Password are used only if DefaultCredentials is set to false.

.NET Framework
Available since 2.0
Return to top
Show: