Click or drag to resize
MimeKit

MailFolderStatus Method

Update the values of the specified items.

Namespace: MailKit
Assembly: MailKit (in MailKit.dll) Version: 4.7.1
Syntax
C#
public abstract void Status(
	StatusItems items,
	CancellationToken cancellationToken = default
)

Parameters

items  StatusItems
The items to update.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Implements

IMailFolderStatus(StatusItems, CancellationToken)
Exceptions
ExceptionCondition
ObjectDisposedException The IMailStore has been disposed.
ServiceNotConnectedException The IMailStore is not connected.
ServiceNotAuthenticatedException The IMailStore is not authenticated.
FolderNotFoundException The MailFolder does not exist.
NotSupportedException The mail store does not support the STATUS command.
OperationCanceledException The operation was canceled via the cancellation token.
IOException An I/O error occurred.
ProtocolException The server's response contained unexpected tokens.
CommandException The command failed.
Remarks

Updates the values of the specified items.

The Status(StatusItems, CancellationToken) method MUST NOT be used on a folder that is already in the opened state. Instead, other ways of getting the desired information should be used.

For example, a common use for the Status(StatusItems, CancellationToken) method is to get the number of unread messages in the folder. When the folder is open, however, it is possible to use the Search(SearchQuery, CancellationToken) method to query for the list of unread messages.

See Also