ImapClose Method (Boolean) |
Namespace: MailBee.ImapMail
Exception | Condition |
---|---|
MailBeeException | An error occurred and ThrowExceptions is true. |
If expungeDeleted is true, this method sends CLOSE command to the IMAP4 server. This commands expunges all messages marked as deleted from the selected folder, and then unselects the folder.
If expungeDeleted is false, this method simply unselects the currently selected folder. No messages are expunged. Unselecting is performed either via UNSELECT command if the server supports UNSELECT capability or via SELECT command without argument if UNSELECT capability is not supported.
Note |
---|
Another way of keeping messages marked as deleted without expunging them is calling Disconnect method or selecting another folder using SelectFolder(String) or ExamineFolder(String) method. Close(false) should only be used when the developer needs to close the current folder but retain the connection and do not select another folder. |