Click or drag to resize
MimeKit

SmtpClientVerify Method

Verify the existence of a mailbox address.

Namespace:  MailKit.Net.Smtp
Assembly:  MailKit (in MailKit.dll) Version: 2.3.0
Syntax
C#
public MailboxAddress Verify(
	string address,
	CancellationToken cancellationToken = null
)

Parameters

address
Type: SystemString
The mailbox address.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation token.

Return Value

Type: MailboxAddress
The expanded mailbox address.
Exceptions
ExceptionCondition
ArgumentNullExceptionaddress is null.
ArgumentExceptionaddress is an empty string.
ObjectDisposedException The SmtpClient has been disposed.
ServiceNotConnectedException The SmtpClient is not connected.
ServiceNotAuthenticatedException Authentication is required before verifying the existence of an address.
OperationCanceledException The operation has been canceled.
IOException An I/O error occurred.
SmtpCommandException The SMTP command failed.
SmtpProtocolException An SMTP protocol exception occurred.
Remarks
Verifies the existence a mailbox address with the SMTP server, returning the expanded mailbox address if it exists.
See Also