Author |
|
jhoiemarie
Joined: 29 Nov 2011 Posts: 5
|
Posted: Mon 05 Dec '11 10:06 Post subject: PHP SMTP Error: Failed to Connect to server |
|
|
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: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 05 Dec '11 14:25 Post subject: |
|
|
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
|
Posted: Tue 06 Dec '11 2:37 Post subject: |
|
|
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: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 06 Dec '11 13:18 Post subject: |
|
|
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
|
Posted: Wed 07 Dec '11 5:35 Post subject: |
|
|
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: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 09 Dec '11 10:11 Post subject: |
|
|
Your script works fine. So I think a firewall or an antivirus scanner blocks the request or a proxy server. |
|
Back to top |
|