Click or drag to resize
MimeKit

IMailFolderExpungeAsync(CancellationToken) Method

Asynchronously expunge the folder, permanently removing all messages marked for deletion.

Namespace: MailKit
Assembly: MailKit (in MailKit.dll) Version: 4.7.1
Syntax
C#
Task ExpungeAsync(
	CancellationToken cancellationToken = default
)

Parameters

cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

Task
An asynchronous task context.
Remarks

Asynchronously expunges the folder, permanently removing all messages marked for deletion.

Note  Note
Normally, an MessageExpunged event will be emitted for each message that is expunged. However, if the mail store supports the quick resynchronization feature and it has been enabled via the EnableQuickResync(CancellationToken) method, then the MessagesVanished event will be emitted rather than the MessageExpunged event.
See Also