Hi

I need to set the filter in imap_search the condition is filter should take the yesterdays date dynamically

$gmail = imap_search($inbox,"ON 01-01-2012");

Thanks

echo $yesterday = date("j F Y", strtotime("-1 days"));
$emails = imap_search($mbox,'ON "'.$yesterday.'"');

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.