Imap ClientGet Folder(Special Folder) Method
Get the specified special folder.
Definition
Namespace: MailKit.Net.Imap
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
The folder if available; otherwise .
IMailStoreGetFolder(SpecialFolder)
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
C#
public override IMailFolder? GetFolder(
SpecialFolder folder
)Parameters
- folder SpecialFolder
- The type of special folder.
Return Value
IMailFolderThe folder if available; otherwise .
Implements
IMailStoreGetFolder(SpecialFolder)IMailStoreGetFolder(SpecialFolder)
Remarks
Not all IMAP servers support special folders. Only IMAP servers
supporting the SpecialUse or
XList extensions may have
special folders.
Exceptions
| ArgumentOutOfRangeException | folder is out of range. |
| ObjectDisposedException | The ImapClient has been disposed. |
| ServiceNotConnectedException | The ImapClient is not connected. |
| ServiceNotAuthenticatedException | The ImapClient is not authenticated. |
| NotSupportedException | The IMAP server does not support the SPECIAL-USE nor XLIST extensions. |