logoon  windows
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge



Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored by anyone.

Your donations will help to keep this site alive and well, and continuing the building of the binaries.



PHP SMTP Error: Failed to Connect to server

 
Post new topic   Reply to topic    Apache Forum Index -> Other Software



View previous topic :: View next topic  
Author Message
jhoiemarie



Joined: 29 Nov 2011
Posts: 5

PostPosted: Mon 05 Dec '11 10:06    Post subject: PHP SMTP Error: Failed to Connect to server Reply with quote

SMTP -> ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: No such host is known. (0)
SMTP Error: Could not connect to SMTP host. Mailer Error: SMTP Error: Could not connect to SMTP host.

Hi All,

I am not sure if this message is in anyway related to Apache. I am sending an email using smtp and I know that port 25 is open and not blocked. Is there any way to send email without using port 25? How do I do that? Do I have to configure anything in php.ini or httpd.conf?

Thanks.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 5078
Location: Germany, Next to Hamburg

PostPosted: Mon 05 Dec '11 14:25    Post subject: Reply with quote

It would help if you could provide the php code you are using for sending the mail. However this related to your script and or php.ini
Do you use a local mail server or remote email server?
Back to top
jhoiemarie



Joined: 29 Nov 2011
Posts: 5

PostPosted: Tue 06 Dec '11 2:37    Post subject: Reply with quote

James Blond wrote:
It would help if you could provide the php code you are using for sending the mail. However this related to your script and or php.ini
Do you use a local mail server or remote email server?


Hi,

I used the regular code for sending an SMTP email. I've used PHP Mailer. Whai I dont understand is that even though our network admin allow the port 25 in our organization, I still could not send the email properly. What shall I do? Whenever I'm home, and my ISP run in normal connection, things work out just fine.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 5078
Location: Germany, Next to Hamburg

PostPosted: Tue 06 Dec '11 13:18    Post subject: Reply with quote

What I need it

  • php code snippet helps.
  • Do you use an IP or a hostname for connecting?
  • Does the windows firewall let the connection out from the server apache is running on?
  • PHP Mail is a php class? Somewhere where I can take a look at the code?
  • php.ini mail settings
Back to top
jhoiemarie



Joined: 29 Nov 2011
Posts: 5

PostPosted: Wed 07 Dec '11 5:35    Post subject: Reply with quote

James Blond wrote:
What I need it

  • php code snippet helps.
  • Do you use an IP or a hostname for connecting?
  • Does the windows firewall let the connection out from the server apache is running on?
  • PHP Mail is a php class? Somewhere where I can take a look at the code?
  • php.ini mail settings


Hi,

can i just send the code to your email address?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 5078
Location: Germany, Next to Hamburg

PostPosted: Fri 09 Dec '11 10:11    Post subject: Reply with quote

Your script works fine. So I think a firewall or an antivirus scanner blocks the request or a proxy server.
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Other Software
Page 1 of 1