Internet Direct (Indy) Version 9.0.1 Beta
TIdIMAP4.CloseMailBox
Closes the currently selected mailbox.

function CloseMailBox: Boolean;
Returns
Boolean - True on success.

Description
CloseMailBox is a Boolean function that closes the currently selected mailbox. CloseMailBox requires that ConnectionState contain the value csSelected, or an EIdConnectionStateError exception will be raised. CloseMailBox calls SendCmd using the IMAP CLOSE command, and sets ConnectionState to csAuthenticated on successful completion.