473,320 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 73716
*** 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: King Kong | last post by:
Hi it seems this has been discussed various times. Although I cannot find a solution. Ebvironment: Win 2k Apache 2 PHP 4.3.7 I use the module mode and not the cgi mode. I cannot send email...
1
by: Alan Little | last post by:
Has anyone ever figured out the problem with this? I have sendmail_from set in my php.ini, and I also in this case have a custom From: header, but I still get this message. Here's the relevant...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
3
chunk1978
by: chunk1978 | last post by:
i keep reading "simply do this with PHPs built-in Mail() function"... wtfever! i've been trying to get this working for a week, and it's still a big mystery... my PHP script: <?php $to =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.