473,394 Members | 1,866 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,394 software developers and data experts.

Failed to connect to mailserver

I am running IIS5 on my XP Pro home computer and am unable to send
email through my ISP's mail server. In the PHP.INI are two lines:

smtp = smtp.telus.net
smtp_port = 25

I have opened port 25 on my own computer (do I need to though?) and I
am able to telnet to the ISP's SMTP server. When I try to send an email
from my PHP page I get the well-known error message:

Warning: mail() [function.mail]: Failed to connect to mailserver at
"localhost" port 25, verify your "SMTP" and "smtp_port" setting in
php.ini or use ini_set() in [filename] on line 40.

The strange thing is, the mail() function seems to be trying to connect
to "localhost" and not "smtp.telus.net". There is only one PHP.INI file
(in C:\WINDOWS) and I have run phpinfo() to confirm that this indeed is
the INI file being loaded. However phpinfo() states that the SMTP
server is "localhost" and not "smtp.telus.net".

I added an ini_set("smtp", "smtp.telus.net") right before the mail()
function and got the same error: unable to connect to "localhost".

I am not running IIS's SMTP service, and I am stumped. Any help is
appreciated!

Aug 10 '06 #1
2 10794
*** nv******@gmail.com escribió/wrote (10 Aug 2006 11:57:08 -0700):
I am running IIS5 on my XP Pro home computer and am unable to send
email through my ISP's mail server. In the PHP.INI are two lines:

smtp = smtp.telus.net
smtp_port = 25

I have opened port 25 on my own computer (do I need to though?)
Actually, you shouldn't ;-)
The strange thing is, the mail() function seems to be trying to connect
to "localhost" and not "smtp.telus.net". There is only one PHP.INI file
(in C:\WINDOWS) and I have run phpinfo() to confirm that this indeed is
the INI file being loaded. However phpinfo() states that the SMTP
server is "localhost" and not "smtp.telus.net".
Apparently, directives are case sensitive. Try to specify SMTP in
uppercase, as in manual and comments:

SMTP = smtp.telus.net
smtp_port = 25

--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Aug 10 '06 #2
Wow the one thing I failed to check -- case sensitivity! I changed
"smtp" to "SMTP", rebooted and now all is well in my world. Thanks very
much for putting and end to my frustrations!

Alvaro G. Vicario wrote:
*** nv******@gmail.com escribió/wrote (10 Aug 2006 11:57:08 -0700):
I am running IIS5 on my XP Pro home computer and am unable to send
email through my ISP's mail server. In the PHP.INI are two lines:

smtp = smtp.telus.net
smtp_port = 25

I have opened port 25 on my own computer (do I need to though?)

Actually, you shouldn't ;-)
The strange thing is, the mail() function seems to be trying to connect
to "localhost" and not "smtp.telus.net". There is only one PHP.INI file
(in C:\WINDOWS) and I have run phpinfo() to confirm that this indeed is
the INI file being loaded. However phpinfo() states that the SMTP
server is "localhost" and not "smtp.telus.net".

Apparently, directives are case sensitive. Try to specify SMTP in
uppercase, as in manual and comments:

SMTP = smtp.telus.net
smtp_port = 25

--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--
Aug 11 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: aa | last post by:
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...
5
by: Craig Stratton | last post by:
Hi, cobalt 2.2.16 psql 7.2.3 DBI 1.32 I get this error, as in subject:- pqReadData() -- read() failed: errno=32 and then followed by this pqReadData() -- backend closed the channel...
3
by: mark.macumber | last post by:
This issue is really annoying me, I dont know why its happening. I did a PHP site for a client and it uses the php mail() function. The site is now live and works fine. It seems that whenever a...
12
by: Michael | last post by:
Please Help me. I've got a .Net 2003 program that attaches to a SQL Server machine and I'm getting the above error when a user tries to log in. The SQL server is setup to use Windows Auth. and I...
5
by: Ramtin | last post by:
Hi; when I use sql server connection or ole connection for working with database I receive the login failed for user 'any user that I work'.I've been granted ASPNET user in sql.
5
by: Nathan Sokalski | last post by:
I am attempting to send an email using ASP.NET 1.1's Mail.SmtpMail.Send() method. My code contains all of the following: Dim mailmsg As New Mail.MailMessage Mail.SmtpMail.SmtpServer =...
4
by: mmr315 | last post by:
Warning: mail() : Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\Apache2.2\htdocs\mail.php on line 7 i...
2
by: jephperro | last post by:
Hi there, I have a problem using PHPMailer. On my local development machine, the script works fine and sends emails. On amy staging server, when I try to use PHPMailer to send() I see the...
0
by: sa6113 | last post by:
I want to connect to a Windows machine in my network , using ssh, I use paramiko but I have problem in authentication, would you please help me? 1- I have installed freeSSHD in server machine? Is...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.