therealwesfoster Posted July 3, 2008 Share Posted July 3, 2008 I'm having some problems with gmail's IMAP. Here's my sample code: <?php // Connection $server = "imap.gmail.com"; $user = "MYEMAIL@gmail.com"; $pass = "MYPASS"; $conn = imap_open("{".$server.":993/imap/ssl}INBOX", $user, $pass) or die("Error: " . imap_last_error()); ?> This works fine when I run it on my localhost server, but when I upload it to my other server (hosted by hostgator), I get this error: Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl}INBOX in /home/path/to/imap.php on line 9 Error: Can't connect to gmail-imap.l.google.com,993: Connection refused Both servers have IMAP enabled. And yes, I have turned IMAP on in my gmail settings. What could be causing the problem? Wes Quote Link to comment Share on other sites More sharing options...
teynon Posted July 3, 2008 Share Posted July 3, 2008 uh oh... connection refused... not a good sign Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.