|ImapClose Method (Boolean)|
public bool Close( bool expungeDeleted )
Public Function Close ( expungeDeleted As Boolean ) As Boolean
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.
|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.|