Indy 9
|
SearchMailBox requires that ConnectionState contain the value csSelected, or an EIdConnectionStateError exception will be raised.
SearchMailBox constructs a search query, using the search keys in ASearchInfo, and calls SendCmd using the IMAP4 SEARCH command using the specified search criteria. Date values in the TIdIMAP4SearchRec specified by ASearchInfo are represented using the ShortDateFormat 'dd-MMM-yyyy' and the date separator '-'. SearchMailBox calls ParseSearchResultDetails to load values in CmdResultDetails into Mailbox.
SearchMailBox sets the reurn value for the method to True when numeric protocol response in LastCmdResult contains the value wsOk.