php imap_search SINCE date problem

Posted by Daniel on Stack Overflow See other posts from Stack Overflow or by Daniel
Published on 2010-05-09T15:54:02Z Indexed on 2010/05/09 15:58 UTC
Read the original article Hit count: 550

Filed under:
|

Hey
I'm trying to show only the emails received in the last 5 min for example
$since = date('d-M-Y G\:i', time() - 300); // actual time - 5 min $mb=imap_search ($m_mail, 'UNSEEN SINCE ' . $since . '');
Is there an easy way to do this ? I find a way: take all the unseen mails for the curent day(ex:9 may 2010), loop it and for then checking if it was send in the last X minutes echo it( using the imap_headerinfo->udate )BUT when i looked at gmail.com one email was recevied at 17:08 and on my server appears that the email was received at 14:08

Dan

© Stack Overflow or respective owner

Related posts about php

Related posts about imap