WindowsSecureMimeContextExportAsync Method

Asynchronously export certificates for the specified mailboxes.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public override 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 ApplicationPkcs7Mime instance containing the exported keys.

Implements

ICryptographyContextExportAsync(IEnumerableMailboxAddress, CancellationToken)

Remarks

Asynchronously exports the certificates for the specified mailboxes.

Exceptions

ArgumentNullException mailboxes is .
ArgumentException No mailboxes were specified.
OperationCanceledException The operation was canceled via the cancellation token.
CertificateNotFoundException A certificate for one or more of the mailboxes could not be found.
CryptographicException An error occurred in the cryptographic message syntax subsystem.

See Also