Topic Path: Pending > TIdIMAP4.UIDSearchMailBox@array of TIdIMAP4SearchRecArray
ContentsIndexHome
PreviousUpNext
TIdIMAP4.UIDSearchMailBox@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.

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

UIDSearchMailBox requires that ConnectionState contain the value csSelected, or an EIdConnectionStateError exception will be raised. 

UIDSearchMailBox constructs a search query, using the search keys in ASearchInfo, and calls SendCmd using the IMAP4 SEARCH command 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 '-'. Messages meeting the search criteria in ASearchInfo are identified using their unique identifier (UID). 

UIDSearchMailBox parses the IMAP4 server response to load values in values into the Mailbox property. 

UIDSearchMailBox sets the return value for the method to True when the IMAP4 server response contains the value IMAP_OK

Use SearchMailBox to select messages meeting the search criteria ordered by their relative message number.

TIdIMAP4SearchRec ConnectionState EIdConnectionStateError MailBox SearchMailBox

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.