Click or drag to resize
MimeKit

SmtpClientExpandAsync Method

Asynchronously expand a mailing address alias.

Namespace:  MailKit.Net.Smtp
Assembly:  MailKit (in MailKit.dll) Version: 2.3.0
Syntax
C#
public Task<InternetAddressList> ExpandAsync(
	string alias,
	CancellationToken cancellationToken = null
)

Parameters

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

Return Value

Type: TaskInternetAddressList
The expanded list of mailbox addresses.
Exceptions
ExceptionCondition
ArgumentNullExceptionalias is null.
ArgumentExceptionalias 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
Expands a mailing address alias.
See Also