Click or drag to resize

SmtpUseBestLoginAsync Method

Logs user in using best method available. When no AUTH capability is found, this method switches to SSL/TLS (StartTLS) and tries again.

Namespace: Limilabs.Client.SMTP
Assembly: Mail (in Mail.dll) Version: 3.0.26106.1555
Syntax
public Task UseBestLoginAsync(
	string user,
	string password,
	CancellationToken cancel = default
)

Parameters

user  String
User's login.
password  String
User's password.
cancel  CancellationToken  (Optional)
A cancellation token that can be used to signal the asynchronous operation should be canceled.

Return Value

Task
A task that represents the asynchronous login operation.
Exceptions
ExceptionCondition
SmtpResponseExceptionThrows SmtpResponseException on error response.
See Also