Red
Red

Reputation: 6378

php imap_search filter

I need to filter the Email from INBOX by filter FROM address.

What i have is email address of a particular user say [email protected] and i dont have his name/nickName/ContactName On MAIL etc

How can i get all mail from this user using his Email address ?

I tried

$some   = imap_search($con, 'FROM "[email protected]"', SE_UID);         
var_dump($some);

and it returns FALSE

But the following one works

 $some   = imap_search($con, 'FROM "user"', SE_UID);            
    var_dump($some);

Please note that user is his name ,but i need to filter it using the actual email address,

Please help

Thanks in advance.

Upvotes: 0

Views: 2105

Answers (1)

Nick
Nick

Reputation: 2613

Remove the double-quotes that are wrapping the email address.

$some   = imap_search($con, 'FROM [email protected]', SE_UID)

Upvotes: 1

Related Questions