Internet Direct (Indy) Version 9.0.1 Beta
|
function RetrieveAllMsgs(AMessageList: TIdMessageCollection): Boolean;
RetrieveAllMsgs is used in SelectMailBox to automatically retrieve data from the selected mailbox when RetrieveOnSelect contains the value rsMessages.
RetrieveAllMsgs requires that ConnectionState contain the value csSelected, or an EIdConnectionStateError exception will be raised.
When AMessageList is unassigned (Nil), RetrieveAllHeaders will set the return value to False and exit from the method. Otherwise, RetrieveAllMsgs will create a new message in the collection and call Retrieve for each individual message number. If the headers for given message cannot be loaded from the IMAP mailbox, the return value is set to False and additional messages are ignored.
RetrieveAllMsgs will return True when all messages have been retrieved from the mailbox.
Use RetrieveAllHeaders to fetch only message headers for the message collection.