Hi Guys,
I am attempting to access my Gmail account using PHP on my bluehost account and I keep getting the following error:
Connection failed to gmail-imap.l.google.com,993: Connection timed out
The code I'm using is:
<?php
$server = "imap.gmail.com";
$user = "user@gmail.com";
$pass = "pass";
$conn = @imap_open("\{$server:993/imap/ssl}INBOX", $user, $pass)
or die("Connection to server failed: ". imap_last_error());
?>
I have tried a couple other flags in combination with /ssl e.g. /notls /novalidate-cert
Any one succesfully tried this?
I have checked that the phpinfo() has imap and ssl enabled.
I have also checked that the port number and host name is correct. I have also tried imap.googlemail.com too.
Thanks heaps,
Adrian


Reply With Quote


