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 = "[email protected]"; $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 Link to comment https://forums.phpfreaks.com/topic/113155-php-imap-and-gmail/ 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 Link to comment https://forums.phpfreaks.com/topic/113155-php-imap-and-gmail/#findComment-581390 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.