Internet Direct (Indy) Version 9.0.1 Beta
|
function SelectMailBox(const AMBName: String): Boolean; overload;
SelectMailBox requires that the value of ConnectionState contain either csAuthenticated or csSelected, or an EIdConnectionStateError exception will be raised.
SelectMailBox calls SendCmd using the IMAPO4 SELECT command for the specified mailbox name. On successful completion of the command, SelectMailBox calls ParseSelectResultDetails to load the values in CmdResultDetails into MailBox. SelectMailBox also sets ConnectionState to the value csSelected.
SelectMailBox also calls either RetrieveAllHeaders or RetrieveAllMsgs, based on the value of RetrieveOnSelect, to populate the message list in MailBox.
SelectMailBox sets the return value for the method to True when ResultNo contains the value wsOk.