Search code examples
phpgmailimapgmail-imap

fetching gmail inbox with imap


i got a code from here to download gmail inbox: http://davidwalsh.name/gmail-php-imap

use these 2 hostnames 
$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';
{imap.gmail.com:993/imap/ssl/novalidate-cert/norsh}Inbox

but getting this error.

 Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl/novalidate-cert/norsh}Inbox in /home/medicalh/public_html/testmail.php on line 9
Cannot connect to Gmail: Can't connect to gmail-imap.l.google.com,993: Connection timed out

i have searched on stackoverflow but did't got solution

thanks


Solution

  • You can download my Gmail class at my website: . I have also included a test file for you to test the class file.

    If it does not work, I believe it could be your server's problem. You should contact your system administrator.