Internet Direct (Indy) Version 9.0.2 Beta
TIdIMAP4.StatusMailBox
Retrieves status data items for the specified mailbox.

function StatusMailBox(const AMBName: String; AMB: TIdMailBox; const AStatusDataItems: array of TIdIMAP4StatusDataItem): Boolean;
Parameters
const AMBName: String
Mailbox name tio be accessed and loaded.

AMB: TIdMailBox
Represents the contents read from the mailbox.

const AStatusDataItems: array of TIdIMAP4StatusDataItem
Status data items to be retrieved.

Returns
Boolean - True on success.

Description
StatusMailBox is a Boolean function that retrieves the status data items specified in AStatusDataItems for the mailbox specified in AMBName.

StatusMailBox requires that the value of ConnectionState contain either csAuthenticated or csSelected, or an EIdConnectionStateError exception will be raised.

StatusMailBox calls SendCmd using the IMAP4 STATUS command for the specified mailbox name and data items. On succesful completion, StatusMailBox calls ParseStatusResultDetails to load the values in CmdResultDetails into the Mailbox sopecified in AMB.

StatusMailBox sets the return value for the method to True when ResultNo contains the value wsOk.