Guest User

Untitled

a guest
Sep 25th, 2018
372
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. /* connect to gmail */
  2. $hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
  3. $username = 'xxxxx@gmail.com';
  4. $password = 'xxxxx';
  5.  
  6. $inbox = imap_open($hostname,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error());
  7.  
  8. /* grab emails */
  9. $emails = imap_search($inbox,"RECENT");
  10.  
  11. /* grab emails */
  12. $date = date ( "d-M-Y", strtotime ( "-3 days" ) );
  13. $search = 'SINCE "'.$date.'"';
  14. $emails = imap_search($inbox, $search);
  15.  
  16. Notice: Unknown: Unknown search criterion: SINCE (errflg=2) in Unknown on line 0
Add Comment
Please, Sign In to add comment