PHP Classes

Gmail - fsockopen Error 13

Recommend this page to a friend!

      POP3 e-mail client  >  All threads  >  Gmail - fsockopen Error 13  >  (Un) Subscribe thread alerts  
Subject:Gmail - fsockopen Error 13
Summary:Error 13 - Unable to connect to pop.gmail.com:995
Messages:7
Author:Daniel B
Date:2008-11-05 00:47:26
Update:2011-05-12 22:51:42
 

  1. Gmail - fsockopen Error 13   Reply   Report abuse  
Picture of Daniel B Daniel B - 2008-11-05 00:47:26
Hello,

These are the output error messages I am receiving:

Connecting to pop.gmail.com ...
error connecting to the pop3 server()

error = 13 could not connect to the host "pop.gmail.com" unable to connect to pop.gmail.com:995

With the exception of changing the fsockopen() call, I am using the standard pop3 class you've written.

This used to work, but it recently stopped working.

Here is the script I am using:

<HTML>
<HEAD>
<TITLE>Test for Manuel Lemos's PHP POP3 class</TITLE>
</HEAD>
<BODY>
<?php

require("pop3.php");

/* Uncomment when using SASL authentication mechanisms */
/*
require("sasl.php");
*/

$pop3=new pop3_class;
$pop3->hostname="pop.gmail.com"; /* POP 3 server host name */
$pop3->port=995; /* POP 3 server host port,
usually 110 but some servers use other ports
Gmail uses 995 */
$pop3->tls=1; /* Establish secure connections using TLS */
$user="my_username"; /* Authentication user name */
$password="my_password"; /* Authentication password */
$pop3->realm=""; /* Authentication realm or domain */
$pop3->workstation=""; /* Workstation for NTLM authentication */
$apop=0; /* Use APOP authentication */
$pop3->authentication_mechanism="USER"; /* SASL authentication mechanism */
$pop3->debug=1; /* Output debug information */
$pop3->html_debug=1; /* Debug information is in HTML */
$pop3->join_continuation_header_lines=1; /* Concatenate headers split in multiple lines */

if(($error=$pop3->Open())=="")
{
...

}
if($error!="")
echo "<H2>Error: ",HtmlSpecialChars($error),"</H2>";
?>

</BODY>
</HTML>

  2. Re: Gmail - fsockopen Error 13   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-11-05 18:28:36 - In reply to message 1 from Daniel B
I do not find any documention for system error 13. Since you said you changed the fsockopen call, it is hard to tell what that could mean. Can you tell what code did you use to change the fsockopen call?

  3. Re: Gmail - fsockopen Error 13   Reply   Report abuse  
Picture of Daniel B Daniel B - 2008-11-06 01:43:53 - In reply to message 2 from Manuel Lemos
Thank you for your reply.

The only change to fsockopen was to the @ symbol from "@fsockopen."

  4. Re: Gmail - fsockopen Error 13   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2008-11-06 02:12:27 - In reply to message 3 from Daniel B
That does not change the functionality.

Searching the Web for fsockopen error 13 it seems that you may have a firewall on the way to access the POP3 server you want to access. In that case you may need to ask your systems administrator to verify whether that is really the case.

  5. Re: Gmail - fsockopen Error 13   Reply   Report abuse  
Picture of Daniel B Daniel B - 2008-11-06 02:16:06 - In reply to message 4 from Manuel Lemos
Well, Yahoo is the webhost. It used to work, but they changed configuration recently. Maybe that's what happened.

Thank you for your reply.

  6. Re: Gmail - fsockopen Error 13   Reply   Report abuse  
Picture of Prabhakar Rao Bodipalli Prabhakar Rao Bodipalli - 2011-05-12 14:20:01 - In reply to message 5 from Daniel B
Error: 3 POP3 server greeting was not found?
how can i fix this

  7. Re: Gmail - fsockopen Error 13   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-05-12 22:51:42 - In reply to message 6 from Prabhakar Rao Bodipalli
That means that class connected to the server but it did not get the initial POP3 handshake. You are most likely connecting to the wrong port or address, probably of some other protocol, not POP 3.