Click or drag to resize

SmtpClientAuthenticate Method (String, String)

Authenticates client with specified user name and password.

Namespace:  GemBox.Email.Smtp
Assembly:  GemBox.Email (in GemBox.Email.dll) Version: 13.0.35.1003
Syntax
public void Authenticate(
	string userName,
	string password
)

Parameters

userName
Type: SystemString
The user name.
password
Type: SystemString
The password for the user name.
Exceptions
ExceptionCondition
InvalidOperationException Client is not connected or Client is already authenticated.
ArgumentException 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