Internet Direct (Indy)
Home
PreviousUpNext
TIdIMAP4.SearchMailBox@array of TIdIMAP4SearchRecArray

Searches for messages in the current mailbox using the specified search criteria.

Parameters 
Description 
ASearchInfo 
Search criteria to use in searching mailbox messages. 

Boolean - True on success.

SearchMailBox is a Boolean function that searches for messages in the currently selected mailbox using the search criteria specified in ASearchInfo. 

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 and 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 in the serve response into the Mailbox property. 

SearchMailBox sets the reurn value for the method to True when server response contains the value IMAP_OK.

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.