Internet Direct (Indy) Version 9.0.2 Beta
|
function RetrieveAllHeaders(AMessageList: TIdMessageCollection): Boolean;
RetrieveAllHeaders is used in SelectMailBox to automatically retrieve data from the selected mailbox when RetrieveOnSelect contains the value rsHeaders.
RetrieveAllHeaders 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, RetrieveAllHeaders will create a new message in the collection and call RetrieveHeader for each individual message number. If the headers for a given message cannot be loaded from the IMAP mailbox, the return value is set to False and additional messages are ignored.
RetrieveAllHeaders will return True when all message headers have been retrieved from the mailbox.
Use RetrieveAllMsgs to fetch both message headers and contents in a message collection.