Mail StoreGet Folder Async Method
Asynchronously get the folder for the specified path.
Definition
Namespace: MailKit
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
The folder.
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
C#
public abstract Task<IMailFolder> GetFolderAsync(
string path,
CancellationToken cancellationToken = default
)Parameters
- path String
- The folder path.
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskIMailFolderThe folder.
Implements
IMailStoreGetFolderAsync(String, CancellationToken)Remarks
Asynchronously gets the folder for the specified path.
Exceptions
| ArgumentNullException | path is . |
| 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. |
| FolderNotFoundException | The folder could not be found. |
| IOException | An I/O error occurred. |
| ProtocolException | A protocol error occurred. |
| CommandException | The command failed. |