SmtpNetworkElement.UserName 屬性

定義

取得或設定用於連接至 SMTP 電子郵件伺服器的使用者名稱。

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

屬性值

字串,表示用於連接至 SMTP 電子郵件伺服器的使用者名稱。

屬性

備註

設定 DefaultCredentials 優先于設定 UserNamePasswordUserName只有在 設定為 falseDefaultCredentials ,才會使用 和 Password

適用於

另請參閱