PHP Classes

Error: This computer address

Recommend this page to a friend!

      MIME E-mail message sending  >  MIME E-mail message sending package blog  >  PHP Mail Alternative ...  >  All threads  >  Error: This computer address  >  (Un) Subscribe thread alerts  
Subject:Error: This computer address
Summary:This computer address: $email_message->localhost ???
Author:Alessio Dev
Date:2009-04-29 15:58:03
Update:2009-04-29 17:29:22

  1. Error: This computer address   Reply   Report abuse  
Picture of Alessio Dev Alessio Dev - 2009-04-29 15:58:03
Hi, i was trying this class on loacalhost and it works but if i put the class on a domain, it doesn't anymore. I'm pretty sure that my error is calling $email_message->localhost= with the wrong parameter. This is the message i got:
Errore: could not connect to the host "": Connection timed out

I've been trying with localhost (silly), $_SERVER['SERVER_ADDR'] (same error message), $_SERVER['HTTP_HOST'] (still the same error). All is still working on localhost with: $email_message->localhost="localhost"

If someone knows the answer to this problem, please POST it! Thanks to all

  2. Re: Error: This computer address   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2009-04-29 17:29:22 - In reply to message 1 from Alessio Dev
The localhost parameter is irrelevant in your case because it is only used to after you connect to the SMTP server but it seems you are not even able to connect.

It is very likely that your network has the outgoing SMTP port blocked. For Gmail you need to use port 465 or 587. Just try one or the other. Also make sure that the timeout variable is set to a large enough value.

If nothing works and it always results in a connection timeout error, ask your system administrator if is there any firewall, anti-virus, proxy blocking connections to both ports 465 and 587.