472,143 Members | 1,698 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini

aa
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?
Jul 17 '05 #1
6 73349
*** aa wrote/escribió (Mon, 8 Nov 2004 16:23:09 -0000):
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)


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
--
Jul 17 '05 #2
aa
Under Windows you cannot send mail through an
executable, you need to have a running mail server that accepts connections through TCP ports.
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)

Is your sendmail listening on port 25?


How do I check it?
Jul 17 '05 #3
*** aa wrote/escribió (Mon, 8 Nov 2004 18:04:20 -0000):
Is there a suitable mailserver in w2k setup disk?
I believe you have IIS. However, it's normally easier to just type the
server your ISP provides.

If I have OE and Outlook running, does this mean that I have a mail
server


Nope, that means you have a mail client.
Is your sendmail listening on port 25?


How do I check it?


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
--
Jul 17 '05 #4
aa
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?
Jul 17 '05 #5
*** aa wrote/escribió (Tue, 9 Nov 2004 09:25:27 -0000):
But what you mean by type the server your ISP provides? I am trying the
mail() to work on my local machine.
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).

2. telnet localhost 25 returns "Connection to host lost"
What does this mean and what shall I do?


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
--
Jul 17 '05 #6
aa
Thanks, Alvaro, this is exactly what I was missing about the whole thing
Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.