Gmail zend imap - latency when fetching messageids

Posted by T.B Ygg on Stack Overflow See other posts from Stack Overflow or by T.B Ygg
Published on 2014-06-03T09:21:03Z Indexed on 2014/06/03 9:24 UTC
Read the original article Hit count: 157

Filed under:
|
|
|
|

i have this code to fetch emails from gmail using imap with the zend framework. i go back 2 days in my search (as i do not want all messages) all works well but it takes forever to load the messages and i need to do this for 5+ users, it seems like the search goes through the entire gmail message archive in getting the newest ones.

my code looks like this:

     $dato = date('j-F-Y', strtotime($Date. ' - 2 days')); 
     $dato = "SINCE ".$dato;
     $messageids = $imap->search(array($dato));

any ideas on how to make zend work faster?

© Stack Overflow or respective owner

Related posts about api

Related posts about email