imap_search

(PHP 3>= 3.0.12, PHP 4 >= 4.0b4)

imap_search --  This function returns an array of messages matching the given search criteria

Description

array imap_search (int imap_stream, string criteria, int flags)

This function performs a search on the mailbox currently opened in the given imap stream. criteria is a string, delimited by spaces, in which the following keywords are allowed. Any multi-word arguments (eg. FROM "joey smith") must be quoted.