CryptographyContextExportAsync Method

Asynchronously exports the keys for the specified mailboxes.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public abstract Task<MimePart> ExportAsync(
	IEnumerable<MailboxAddress> mailboxes,
	CancellationToken cancellationToken = default
)

Parameters

mailboxes  IEnumerableMailboxAddress
The mailboxes.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

TaskMimePart
A new MimePart instance containing the exported keys.

Implements

ICryptographyContextExportAsync(IEnumerableMailboxAddress, CancellationToken)

Remarks

Asynchronously exports the keys for the specified mailboxes.

Exceptions

ArgumentNullException mailboxes is .
ArgumentException mailboxes was empty.
NotSupportedException Exporting keys is not supported by this cryptography context.
OperationCanceledException The operation was cancelled via the cancellation token.

See Also