PHP Classes

Error: it was not possible to read line from the SMTP server

Recommend this page to a friend!

      SMTP E-mail sending class  >  All threads  >  Error: it was not possible to read...  >  (Un) Subscribe thread alerts  
Subject:Error: it was not possible to read...
Summary:I setup the configurations but getting this error
Messages:6
Author:hafeez
Date:2011-07-07 01:44:15
Update:2011-07-07 08:11:29
 

  1. Error: it was not possible to read...   Reply   Report abuse  
Picture of hafeez hafeez - 2011-07-07 01:44:15
I just changed following line
$smtp->host_name="smtp.gmail.com"; /* Change this variable to the address of the SMTP server to relay, like "smtp.myisp.com" */
$smtp->host_port=465; /* Change this variable to the port of the SMTP server to use, like 465 */


Getting this error

Resolving SMTP server domain "smtp.gmail.com"...
Connecting to host address "74.125.127.109" port 465...
Connected to SMTP server "smtp.gmail.com".
Could not send the message to myemail@gmail.com. Error: it was not possible to read line from the SMTP server: data access time out


Please help me to resolve this issue

  2. Re: Error: it was not possible to read...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-07-07 02:41:59 - In reply to message 1 from hafeez
This means that the SMTP server is taking too long to respond. You can increase the timeout variable to an higher value. If it still does not work, it may be a problem related with your machine IP address which may not have a reverse DNS record (PTR).

  3. Re: Error: it was not possible to read...   Reply   Report abuse  
Picture of hafeez hafeez - 2011-07-07 07:29:54 - In reply to message 2 from Manuel Lemos
Thanks bro for your quick response, i increased $smtp->timeout=200 but still facing the same problem.how i can resolve "problem related with your machine IP address", is there any way?

I tested this script on multiple servers and all giving same error.

  4. Re: Error: it was not possible to read...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2011-07-07 08:11:29 - In reply to message 3 from hafeez
If that is really your problem, you probably can't solve that problem because it is usually up to your machine network administrator to assign a reverse DNS record to your IP address.

Are you trying to use your personal computer to send messages? If so, try accessing this site and tell me what IP address it says is yours.

whatismyipaddress.com/

  5. Re: Error: it was not possible to read...   Reply   Report abuse  
Picture of Vision Helpdesk Vision Helpdesk - 2016-05-25 10:56:44 - In reply to message 2 from Manuel Lemos
Hello,

Even I am getting this error when connecting to smtp.gmail.com ssl
port 465

SMTP error - it was not possible to read line from the SMTP server: the server disconnected

What could be the issue?



  6. Re: Error: it was not possible to read...   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2016-05-25 19:12:49 - In reply to message 5 from Vision Helpdesk
Can set debug to true and show the output here?