ISmtp ClientVerify Async Method
Asynchronously verify the existence of a mailbox address.
Definition
Namespace: MailKit.Net.Smtp
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
The expanded mailbox address.
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
C#
Task<MailboxAddress> VerifyAsync(
string address,
CancellationToken cancellationToken = default
)Parameters
- address String
- The mailbox address.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskMailboxAddressThe expanded mailbox address.
Remarks
Verifies the existence a mailbox address with the SMTP server, returning the expanded
mailbox address if it exists.
Exceptions
| ArgumentNullException | address is . |
| ArgumentException | address 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. |