Internet Direct (Indy) Version 9.0.2 Beta
|
function ListInferiorMailBoxes(AMailBoxList: TStringList; AInferiorMailBoxList: TStringList): Boolean;
ListInferiorMailBoxes can be used when the container folder might include many child mailboxes, and the search might be time consuming. ListInferiorMailBoxes requires that the value of ConnectionState be csAuthenticated or csSelected, or an EIdConnectionStateError exception will be raised.
When AMailBoxList in unassigned (Nil), ListInferiorMailBoxes will search for child mailboxes in the currently selected mailbox using the IMAP LIST command. ListInferiorMailBoxes calls ParseListResultDetails to populate the AInferiorMailBoxList variable with the contents of CmdResultDetails including the default "INBOX".
When AMailBoxList contains valid TStrings values, ListInferiorMailBoxes retrieves the child mailbox list for each line in AMailBoxList and accumulates the parsed results in AInferiorMailBoxList.
ListInferiorMailBoxes sets the return value to True when ResultNo contains wsOk.