Jump to content

Can't connect to gmail-imap.l.google.com,993


supratik

Recommended Posts

Hi all,

I am using php-imap to read mails from my gmail account, but when I try the script from browser it shows this error "Can't connect to gmail-imap.l.google.com,993: Permission denied".

I am using Fedora Core 9, I have already installed in my system openssl-0.9.8g-6.fc9.i686, php-5.2.6-2.fc9.i386 and I have installed php-imap-5.2.6-2.fc9.i386 using 'yum install php-imap'.

 

The phpinfo() displays in the IMAP section as

IMAP c-Client Version 2004

SSL Support         enabled

Kerberos Support enabled

 

This is my PHP script

<?php

  $imap = imap_open ("{imap.gmail.com:993/imap/ssl/novalidate-cert}INBOX", "[email protected]", "xxxxxxx")

    or die("can't connect: " . imap_last_error());

 

  $message_count = imap_num_msg($imap);

  print $message_count;

  imap_close($imap);

?>

can anyone please tell me where I am going wrong, also please help me to configure my Linux box for php-imap from scratch.

Please let me know if more information is required.

Please help me !

 

Supratik

Link to comment
https://forums.phpfreaks.com/topic/120813-cant-connect-to-gmail-imaplgooglecom993/
Share on other sites

What part does it fail on? Does it say unknown function? Does it say "can't connect"?

 

Try the following:

 

Open up a command prompt on the webserver/computer and type the following to see if it connects:

 

telnet imap.gmail.com 993

 

See if that works firstly.

 

-steve

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.