Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini 
July 17th, 2005, 09:28 AM
| | | Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini
Warning: mail(): Failed to connect to mailserver at "localhost" port 25,
verify your "SMTP" and "smtp_port" setting in php.ini
in php.ini I have:
SMTP = localhost
SMTP_PORT = 25
SENDMAIL_FROM = NULL
SENDMAIL_PATH = "H:\WINNT\system32\" (this is where sendmail.dll is
sitting. H is the drive with w2k)
Other PHP code on that page is working.
What else should I check? | 
July 17th, 2005, 09:28 AM
| | | Re: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini
*** aa wrote/escribió (Mon, 8 Nov 2004 16:23:09 -0000):[color=blue]
> SMTP = localhost
> SMTP_PORT = 25
> SENDMAIL_FROM = NULL
> SENDMAIL_PATH = "H:\WINNT\system32\" (this is where sendmail.dll is
> sitting. H is the drive with w2k)[/color]
Unless it has been changed in recent versions, Windows builds do not accept
the sendmail_path parameter. Under Windows you cannot send mail through an
executable, you need to have a running mail server that accepts connections
through TCP ports.
Is your sendmail listening on port 25?
--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
-- | 
July 17th, 2005, 09:28 AM
| | | Re: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini
Under Windows you cannot send mail through an[color=blue]
> executable, you need to have a running mail server that accepts[/color]
connections[color=blue]
> through TCP ports.[/color]
Is there a suitable mailserver in w2k setup disk? If I have OE and Outlook
running, does this mean that I have a mail server (my whole question relates
to my local computer only, no ISP is involved)
[color=blue]
> Is your sendmail listening on port 25?[/color]
How do I check it? | 
July 17th, 2005, 09:29 AM
| | | Re: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini
*** aa wrote/escribió (Mon, 8 Nov 2004 18:04:20 -0000):[color=blue]
> Is there a suitable mailserver in w2k setup disk?[/color]
I believe you have IIS. However, it's normally easier to just type the
server your ISP provides.
[color=blue]
> If I have OE and Outlook running, does this mean that I have a mail
> server[/color]
Nope, that means you have a mail client.
[color=blue][color=green]
>> Is your sendmail listening on port 25?[/color]
>
> How do I check it?[/color]
There're many ways. For instance, you can type this in a command line:
telnet localhost 25
and see if someone replies.
--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
-- | 
July 17th, 2005, 09:29 AM
| | | Re: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini
Thanks, Alvaro.
1. > I believe you have IIS. However, it's normally easier to just type the
server your ISP provides.
Yes, IIS5 on w2k Pro
But what you mean by type the server your ISP provides? I am trying the
mail() to work on my local machine.
2. telnet localhost 25 returns "Connection to host lost"
What does this mean and what shall I do? | 
July 17th, 2005, 09:29 AM
| | | Re: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini
*** aa wrote/escribió (Tue, 9 Nov 2004 09:25:27 -0000):[color=blue]
> But what you mean by type the server your ISP provides? I am trying the
> mail() to work on my local machine.[/color]
How do you send your regular mail using Outlook Express? I suppose you've
configured an e-mail account and you've set your ISP's mail server for mail
delivery (something like smtp.virgin.net or whatever its name is). In PHP
is the same.
You don't need to install and configure your own mail server to send mail
from PHP... unless you're interested in learning to configure a MTA (mail
transport agent).
[color=blue]
> 2. telnet localhost 25 returns "Connection to host lost"
> What does this mean and what shall I do?[/color]
I guess you don't have a mail server listening in port 25. Which is
normally a good thing.
--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
-- | 
July 17th, 2005, 09:29 AM
| | | Thanks, fixed
Thanks, Alvaro, this is exactly what I was missing about the whole thing | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 220,662 network members.
|