SmtpNetworkElement::UserName Property
.NET Framework (current version)
Gets or sets the user name to connect to an SMTP mail server.
Assembly: System (in System.dll)
public: [ConfigurationPropertyAttribute("userName")] property String^ UserName { String^ get(); void set(String^ value); }
Property Value
Type: System::String^A string that represents the user name 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
Available since 2.0
Show: