imap_search problems with Exchange 2010

178 views Asked by At

I've seen hundreds of examples here at Stack Overflow about imap_search, but I cant get it work with Exchange 2010.

// This works:
$messages = imap_search(
  $mbox, 'FROM "John Smith"', SE_UID
);

// This doesn't work:
$messages = imap_search(
  $mbox, 'FROM "[email protected]"', SE_UID
);

// This doesn't work either:
$messages = imap_search(
  $mbox, 'FROM [email protected]', SE_UID
);

I cant rely on the name, I need to be sure that mail is being sent from a specific mailbox. Because John Smith may have different mailboxes. How can I perform that?

0

There are 0 answers