tags:

views:

136

answers:

1
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());

+2  A: 

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.

RageZ
Then i have to off the firewall
Bharanikumar
I wouldn't say turn it off but take a look if you can add the proper rule to connect to gmail.
RageZ
hi..see am running this script in the live QA server...Also my friend testing this in another system...there also getting same error...
Bharanikumar
are you able to connect using any low level utility telnet netcat ?
RageZ