PHP : Function Reference : IMAP, POP3 and NNTP Functions : imap_search
admin
This search looks for messages matching ALL criteria, not ANY criteria. For example the search
imap_search($mailbox,'FROM "user" TO "user"')
Will return message that have "user" in both the from and to headers, but not messages with "user" in either the from or to header.
oliver
imap_search() return false if it does not understand the search condition or no messages have been found.
$emails imap_seach($mbox, "UNDELETED SENTSINCE 01-Jan-2002");
if($emails === false)
echo "The search failed";
|