Click or drag to resize
MimeKit

MailStoreGetFolders(FolderNamespace, Boolean, CancellationToken) Method

Get all of the folders within the specified namespace.

Namespace: MailKit
Assembly: MailKit (in MailKit.dll) Version: 4.7.1
Syntax
C#
public virtual IList<IMailFolder> GetFolders(
	FolderNamespace namespace,
	bool subscribedOnly,
	CancellationToken cancellationToken = default
)

Parameters

namespace  FolderNamespace
The namespace.
subscribedOnly  Boolean
If set to true, only subscribed folders will be listed.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

IListIMailFolder
The folders.

Implements

IMailStoreGetFolders(FolderNamespace, Boolean, CancellationToken)
Exceptions
ExceptionCondition
ArgumentNullExceptionnamespace is null.
ObjectDisposedException The MailStore has been disposed.
ServiceNotConnectedException The MailStore is not connected.
ServiceNotAuthenticatedException The MailStore is not authenticated.
OperationCanceledException The operation was canceled via the cancellation token.
IOException An I/O error occurred.
ProtocolException A protocol error occurred.
CommandException The command failed.
Remarks
Gets all of the folders within the specified namespace.
See Also