SmtpClientAuthenticate Method (String, String, SmtpAuthentication) |
Namespace:
GemBox.Email.Smtp
Assembly:
GemBox.Email (in GemBox.Email.dll) Version: 15.0.35.1026
Syntax public void Authenticate(
string userName,
string password,
SmtpAuthentication authentication
)
Public Sub Authenticate (
userName As String,
password As String,
authentication As SmtpAuthentication
)
Parameters
- userName
- Type: SystemString
The user name. - password
- Type: SystemString
The password for the user name. - authentication
- Type: GemBox.Email.SmtpSmtpAuthentication
A constant that specifies which authentication mechanism to use.
Exceptions Exception | Condition |
---|
InvalidOperationException |
Client is not connected
or
Client is already authenticated.
|
ArgumentException |
Specified authentication mechanism is not supported
or
Specified user name is null
or
Specified password is null.
|
Remarks
Method authenticates connected client with remote host. Connected client cannot be reauthenticated. You have to call
Disconnect first.
See Also