SmtpNetworkElement.UserName 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 the user name to connect to an SMTP mail server.
public:
property System::String ^ UserName { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("userName")]
public string UserName { get; set; }
[<System.Configuration.ConfigurationProperty("userName")>]
member this.UserName : string with get, set
Public Property UserName As String
Property Value
A string that represents the user name to connect to an SMTP mail server.
- Attributes
Remarks
Setting DefaultCredentials takes precedence over setting UserName and Password. UserName and Password are used only if DefaultCredentials is set to false
.
Applies to
See also
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.