Page 1 of 1

PHP Emailing?

Posted: Sat Oct 16, 2010 3:12 pm
by robin105
Hi guys!

I been wanting to make a PHP program that connects to gmail and prints out all the emails you have in gmail.

I been reading tutroials on imap, and I been trying to CONNECT to gmail, and it just doesn't work :(.I keep getting this error (if it even loads)
Warning: imap_open() [function.imap-open]: Couldn't open stream {imap.gmail.com:993/imap/ssl}INBOXz in /home/robin105/public_html/txt/2index.php on line 4
can't connect: Can't connect to gmail-imap.l.google.com,993: Connection timed out
This is the code I'm using

Code: Select all

<?php

$mbox = imap_open("{imap.gmail.com:993/imap/ssl}INBOX", "123@gmail.com","123")
	or die("can't connect: " . imap_last_error());
?>
And I checked my imap settings and everything seems ok.
IMAP c-Client Version = 2007e
SSL Support = enabled
Kerberos Support = enabled
And yes, I have IMAP, and POP3 Enabled in Gmail :).

Any help :(?

Re: PHP Emailing?

Posted: Sat Oct 16, 2010 3:44 pm
by jason
Hrm, I'm getting errors related to firewalls blocking port 993. Make sure this isn't the case for you.

Re: PHP Emailing?

Posted: Sat Oct 16, 2010 5:10 pm
by robin105
I checked it using this website, http://ping.eu/port-chk/.

and gmail.com:993 is closed, what can I do about that?
But it's not closed on my server.