(PHP 4, PHP 5, PHP 7)
This function returns an array of messages matching the given search criteria
array imap_search ( resource $imap_stream, string $criteria [, int $options = SE_FREE [, string $charset = NULL ]] )
This function performs a search on the mailbox currently opened in the given IMAP stream.
For example, to match all unanswered messages sent by Mom, you'd use: "UNANSWERED FROM mom". Searches appear to be ca