473,396 Members | 2,013 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

Hello all,
We are, a bunch of college students, trying to host a website for our dept symposium. We are using php for web development. We wanted to send a mail for those who have been accepted for a competion. We tried the following php code

<?php

$mail_to="recipientname@gmail.com";
$mail_from="myname@yahoo.com";
$mail_sub="registration result";
$mail_mesg1="Your request for registration has been accepted. \nLogin to access your account";
$mail_mesg2="Your request for registration has been denied. \nContact Registeration team or retry with valid details";


if(mail($mail_to,$mail_sub,$mail_mesg1,"From:$mail _from/r/nReply-to:$mail_from"))
{
print "<script>window.alert(\"Mail successfully sent\");";
print "</script>";
}
else
{
print "<script>window.alert(\"Retry sending\");";

print "</script>";
}


?>

we had the corresponding html form too, but anyway we hardcoded the informations. we get this following error,

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 C:\xampp\htdocs\try\tmail.php on line 16

We use

Xampp for php, MySql for database, Windows XP operating system.

Till what I read from some searches is that we need a mail server and we have to configure that for some settings. We have no idea what mail server to use or where to find. It would be really cool and great if any of you guys could help us.

Thanks
Suji
Dec 3 '07 #1
2 2153
Lumpy
69
Xampp comes with Mercury mail server I think it is. Configure that and make sure that it is running and working. To accomplish this, I would check out the website or something, I don't really know what would all have to be done for this part.

Once that is done, you may also want to verify your mail function settings in the php.ini, that they match up with your mail server.

After that, if the mail server is functioning, it should work for you.

Hope this helps to get you in the write direction.
Dec 3 '07 #2
Xampp comes with Mercury mail server I think it is. Configure that and make sure that it is running and working. To accomplish this, I would check out the website or something, I don't really know what would all have to be done for this part.

Once that is done, you may also want to verify your mail function settings in the php.ini, that they match up with your mail server.

After that, if the mail server is functioning, it should work for you.

Hope this helps to get you in the write direction.
Hi,

I tried running the Mercury mail but i got this error. Again I dont have a clue what it means. Thanks for helping me with this stuff.

SMTP server response: 553 We do not relay non-local mail, sorry. in

Thanks
Suji
Dec 3 '07 #3

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
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?
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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.