Jump to content

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


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", "my.test@gmail.com", "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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.