 | ImapDeleteFolderAsync(FolderInfo, CancellationToken) Method |
Permanently removes a folder (mailbox) with the given name.
Namespace: Limilabs.Client.IMAPAssembly: Mail (in Mail.dll) Version: 3.0.26106.1555
Syntaxpublic Task DeleteFolderAsync(
FolderInfo folder,
CancellationToken cancel = default
)
Public Function DeleteFolderAsync (
folder As FolderInfo,
Optional cancel As CancellationToken = Nothing
) As Task
public:
Task^ DeleteFolderAsync(
FolderInfo^ folder,
CancellationToken cancel = CancellationToken()
)
member DeleteFolderAsync :
folder : FolderInfo *
?cancel : CancellationToken
(* Defaults:
let _cancel = defaultArg cancel new CancellationToken()
*)
-> Task Parameters
- folder FolderInfo
- Folder name.
- cancel CancellationToken (Optional)
- A cancellation token that can be used to signal the asynchronous operation should be canceled.
Return Value
TaskA task that represents the asynchronous IMAP folder delete operation.
Remarks
IMAP servers may differ in the separator character used in folder hierarchy paths.
Common separator chars are '.' and '/'. For example: "Inbox/Folder" or "Inbox.Folder".
The DELETE command MUST NOT remove inferior hierarchical names. For example, if a mailbox "foo" has an inferior "foo.bar"
(assuming "." is the hierarchy delimiter character), removing "foo" MUST NOT remove "foo.bar".
It is an error to attempt to delete a name that has inferior hierarchical names and also has the \Noselect mailbox name attribute.
It is permitted to delete a name that has inferior hierarchical names and does not have the \Noselect mailbox name attribute.
In this case, all messages in that mailbox are removed, and the name will acquire the \Noselect mailbox name attribute.
See Also