Re: Retrieving pop mail from gmail/ssl
- From: bill <nobody@xxxxxxxxxxx>
- Date: Sun, 07 Jun 2009 09:37:03 -0400
Jerry Stuckle wrote:
bill wrote:it was configuredThe Natural Philosopher wrote:bill wrote:Well, I tried this and the prior suggestion of using imap.gmail.com:993Jerry Stuckle wrote:bill wrote:bill wrote:Álvaro G. Vicario wrote:The server error log says:bill escribió:My ISP recently transferred its mail service to google, which leaves me up a creek. I have an application that used to retrieve pop3 using the IMAP package. Gmail uses POP over SSL on port 995.
I changed my statement to:
$in=imap_open("{pop.gmail.com:995/pop3}","my@xxxxxxxxxxxxxxxxx", "mu_password");
but, obviously this is inadequate as $in return bool(false).
I suppose you have to instruct imap_open() to use SSL. This is from example #1 in the PHP manual:
// To connect to an SSL IMAP or POP3 server, add /ssl after the protocol
// specification:
$mbox = imap_open ("{localhost:993/imap/ssl}INBOX", "user_id", "password");
http://es.php.net/imap_open
Thanks for reading the manual for me, but it doesn't work.
After a long time (5 minutes ?) the script terminates with no output.
here is my test script:
<?php
error_reporting(E_ALL);
echo "about to imap_open <br />";
$in=imap_open("{pop.gmail.com:995/pop3/ssl}","info@xxxxxxxxxxxx", "xxxxxxxxx");
echo "about to get headers - <br />";
$msgs=imap_headers($in); // gets the headers from the currently available msgs
echo " <br />about to imap close <br />";
imap_close($in);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test/Get Mail</title>
</head>
<body>
Test/Get Mail
</body>
</html>
if I comment out the imap_open statement it runs fine.
PHP Warning: imap_open(): Couldn't open stream {pop.gmail.com:995/pop3/ssl} in /hsphere/local/home/techservsys/houndsofheaven.com/ContactManagement/testGetMail.php on line 9
Anyone have any suggestions ?
Is there an imap server running on port 995?
this is pop over ssl. And - this is gmail who does things their own way frequently. I have it running just fine from Thunderbird on port 995, but when I telnet in on that port manually I get, "Connection to host lost"
On the other hand, when I telnet to pop.gmail.com on port 23 I get, "Connect Failed"
The normal port for imapover ssl is 993. Can you telnet into the port (preferably from that server)?
What does the system log show?
I don't think that google is going to let me access their server logs.
bill
Ah. here's a more useful snippet from the manual comments
>>>>
The following works for connecting via POP3 to a gmail server:
imap_open("{pop.gmail.com:995/pop3/ssl/novalidate-cert}INBOX", $username, $password);
<<<<
I cant test, cos have no gmail account.
no joy.
If anyone wants to try these out, I would be willing to give them access to a google account - write me privately: william-take-out-this@xxxxxxxxxxxxxxxxxxxxxxxx
bill
But you never answered my other question - are you sure you have ssl support in PHP?
'--with-openssl=/usr'
'--with-imap=/usr'
and ssl is one of the Registered Stream Socket Transports
'--with-imap-ssl'
.
- Follow-Ups:
- Re: Retrieving pop mail from gmail/ssl
- From: Jerry Stuckle
- Re: Retrieving pop mail from gmail/ssl
- References:
- Re: Retrieving pop mail from gmail/ssl
- From: Jerry Stuckle
- Re: Retrieving pop mail from gmail/ssl
- From: bill
- Re: Retrieving pop mail from gmail/ssl
- From: The Natural Philosopher
- Re: Retrieving pop mail from gmail/ssl
- From: bill
- Re: Retrieving pop mail from gmail/ssl
- From: Jerry Stuckle
- Re: Retrieving pop mail from gmail/ssl
- Prev by Date: Re: script errors not being reported.
- Next by Date: Re: Retrieving pop mail from gmail/ssl
- Previous by thread: Re: Retrieving pop mail from gmail/ssl
- Next by thread: Re: Retrieving pop mail from gmail/ssl
- Index(es):
Relevant Pages
|
Loading