Smtp​Network​Element.​User​Name Property

Definition

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

[System.Configuration.ConfigurationProperty("userName", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
public string UserName { get; set; }
Returns

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.