------------------------------------------------------------------------------------------------------------------------------
imap
IMAP c-Client Version 2004 SSL Support enabled Kerberos Support
enabled
-------------------------------------------------------------------------------------------------------------------------------
And here is my imap connection string to open imap connection.
$serverName = "{imap.gmail.com:993/imap/ssl}INBOX";
The same thing is working on my localhost. But don't know why its not
working on the server. Is there any another setting that I have to
make in order to make it work? Please help me. Thanks in advance.
Last time this question came up, it was finally determined to be a
firewall issue at the hosting company.
So if your PHP scripts are running on a hosted host as it were ;-) check
their security policy.
'Connection refused' means that the target, or a firewall in between,
has accepted the connection request AND SENT BACK A NACK.
Its not that the request to open has got 'lost'. That STRONGLY suggests
an active agent in between you and google actively REJECTING attempts to
open mail connections.
Some get it to work, I am the person for whom it would not work,
even when the hosting company opened the port. But, in my case
the connection was never established.
Still no joy, I am building a local server to play with.
bill
Check out this thread - maybe you guys are using the same isp?
http://groups.google.com/group/comp.lang.php/browse_thread/thread/126879e37a2c7c33?hl=en#
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================
Bill,
Are you sure the port is open? To you have telnet/ssh access to the
server? If so, try logging into the server and just telnet to the port.
You won't be able to do anything - but the important thing here is to
see if a connection can be established.
I sort of have it working now on my local server -
here is the command
$in=imap_open("{pop.gmail.com:995/pop3/ssl/novalidate-cert}INBOX","email@address",
"Password");
(note I am using pop3/ssl not imap/ssl)
I say sort of because I can successfully execute the script, but
it is not returning the messages.
Incremental progress.
So it appears that it was my host that was still blocking the port.
bill
I changed to imap:
$in= imap_open ("{imap.gmail.com:993/imap/ssl}INBOX",
"email@address", "Password");
and the script runs, but still says there are no messages (I know
there are two)
bill
Whether they can do it or not is not important. The question is - can
YOU telnet from their machine to gmail port 993?
problem solved. All it took was building my own server and LAMP
stack and considerable fussing.
Thanks.
CPanel is a control panel for your web site. It has nothing to do with
this problem.
It is likely that your host is blocking the outgoing port. Mine
was. However, after they said they unblocked it, it still did
not work and I gave up. Confront the support people with the
fact that your script works from home and not from their server.
bill
Yes, it probably is a firewall - in which case you'll have to contact
your host. There is nothing you will be able to do about it; such
firewalls affect everything on the IP.
If you have ssh (or telnet) access to the host, try to telnet to the
port. You won't be able to communicate, but if you can connect at least
the firewall is open. If you can't telnet to the port from that server,
then the firewall is most probably the problem.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstu...@attglobal.net
==================
on 06/27/2009 07:17 AM computerzworld said the following:
Connection refused often means no application listening on that port on
that host, but it may also be also the server refusing connections
intentionally for some reason.
Anyway, I do not use IMAP to access Gmail mailboxes. I use POP3 with
this client class and it works well connecting to port 995 using TLS
(which is not exactly the same as SSL). Have you tried POP3 instead of IMAP?
You may want to try this class too as I am sure it works well. Take a
look at the test_pop3.php script, that has example values in comment to
instruct you how to connect to Gmail POP3 .
http://www.phpclasses.org/pop3class
--
Regards,
Manuel Lemos
Find and post PHP jobs
http://www.phpclasses.org/jobs/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/