2
votes
Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl}INBOX in /home/happy/public_html/source/imap/fet_mail_from_email_add.php on line 7
can't connect: Can't connect to gmail-imap.l.google.com,993: Connection timed out

my snippet is

$mbox = imap_open("{imap.gmail.com:993/imap/ssl}INBOX", "[email protected]","somesecretpassword") or die("can't connect: " . imap_last_error());

1
@Bharanikumar: I wouldn't publish my usernamer/password on the web - RageZ
@Bharanikumar: also change your gmail password right NOW - RageZ
yes..that's dummy password... - Bharanikumar
FYI - the script works fine for me - Jason Rowe
@Jason: normal he has a network problem, so it's not the script but his environment. - RageZ

1 Answers

4
votes

Like the error message point out there is a network timeout/connection failure happening.

Make sure any network equipment (Firewall, router with ACL, etc ...) don't disallow to connect to the TCP port 993.

You would probably make sure you can connect from the server to Gmail server using ssh and trying with telnet first, if that test is ok try with PHP.