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

Failed to connect to mailserver

Hi

In PHP, when I am sending a mail following message is getting displayed.

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

Can please help me out.

Thanks
Oct 25 '07 #1
5 3300
ak1dnar
1,584 Expert 1GB
Do you have any known SMTP server that you can use as your SMTP host?
Which OS is using for server?
Simply putting "localhost" you can not use mail() function. you have to use a real smtp server.
Oct 25 '07 #2
Do you have any known SMTP server that you can use as your SMTP host?
Which OS is using for server?
Simply putting "localhost" you can not use mail() function. you have to use a real smtp server.
Hi
OS is WINDOS
I am using SMTP (My mail server IP)
I made changes in my php script & the same thing in php.ini file also.
in script following is given
ini_set('SMTP','ip address');
SMTP_PORT = 110

Thanks
Ratnam
Oct 25 '07 #3
ak1dnar
1,584 Expert 1GB
Hi
OS is WINDOS
I am using SMTP (My mail server IP)
I made changes in my php script & the same thing in php.ini file also.
in script following is given
ini_set('SMTP','ip address');
SMTP_PORT = 110

Thanks
Ratnam
After changing php.ini settings you have to restart server
If not working:
If you have a mail account from this mail server try to configure "outlook" with the same SMTP server IP and PORT.Let me know whether its working or not.
Oct 25 '07 #4
After changing php.ini settings you have to restart server
If not working:
If you have a mail account from this mail server try to configure "outlook" with the same SMTP server IP and PORT.Let me know whether its working or not.
Hi
I have my email id configured on the same system in Outlook.
Mail is working fine.
Only problem with PHP Mail.
Do I need to give the SMTP PORT also.

Pl Help me.

Thanks
Ratnam
Oct 25 '07 #5
ak1dnar
1,584 Expert 1GB
Hi
I have my email id configured on the same system in Outlook.
Mail is working fine.
Only problem with PHP Mail.
Do I need to give the SMTP PORT also.

Pl Help me.

Thanks
Ratnam
Expand|Select|Wrap|Line Numbers
  1. [mail function]
  2. ; For Win32 only.
  3. SMTP = smtp.yourISP.com
  4. smtp_port = 25
Normally SMTP port is 25 but I don't know about your mail server port. Set the same setting as outlook anyway. One more tip, before you execute the php script run outlook and check the mails. some times local php server mail is not strong enough to call to remote mail server. but this problem never occurs while you are on the hosting servers. (restart the server after changing ini settings)

If not working check with your ISP to verify whether the mail server requires authentication before send mails.
Oct 25 '07 #6

Sign in to post your reply or Sign up for a free account.

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: Maellic | last post by:
Hi, The website I am working on is built with ASP.NET and connects to a SQL Server 2000 database. The web server and database are on the same machine. I have recently tried to modify the timeout...
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.
2
by: nvduffer | last post by:
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...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.