Click or drag to resize
MimeKit

ImapClientEnableQuickResyncAsync Method

Asynchronously enable the QRESYNC feature.

Namespace: MailKit.Net.Imap
Assembly: MailKit (in MailKit.dll) Version: 4.3.0
Syntax
C#
public override Task EnableQuickResyncAsync(
	CancellationToken cancellationToken = default
)

Parameters

cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

Task
An asynchronous task context.

Implements

IMailStoreEnableQuickResyncAsync(CancellationToken)
IMailStoreEnableQuickResyncAsync(CancellationToken)
Exceptions
ExceptionCondition
ObjectDisposedException The ImapClient has been disposed.
ServiceNotConnectedException The ImapClient is not connected.
ServiceNotAuthenticatedException The ImapClient is not authenticated.
InvalidOperationException Quick resynchronization needs to be enabled before selecting a folder.
NotSupportedException The IMAP server does not support the QRESYNC extension.
OperationCanceledException The operation was canceled via the cancellation token.
IOException An I/O error occurred.
ImapCommandException The server replied to the ENABLE command with a NO or BAD response.
ImapProtocolException An IMAP protocol error occurred.
Remarks

Enables the QRESYNC feature.

The QRESYNC extension improves resynchronization performance of folders by querying the IMAP server for a list of changes when the folder is opened using the Open(FolderAccess, UInt32, UInt64, IListUniqueId, CancellationToken) method.

If this feature is enabled, the MessageExpunged event is replaced with the MessagesVanished event.

This method needs to be called immediately after calling one of the Authenticate methods, before opening any folders.

See Also