473,788 Members | 2,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Failed to connect to mailserver

2 New Member
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="recip ientname@gmail. com";
$mail_from="myn ame@yahoo.com";
$mail_sub="regi stration result";
$mail_mesg1="Yo ur request for registration has been accepted. \nLogin to access your account";
$mail_mesg2="Yo ur request for registration has been denied. \nContact Registeration team or retry with valid details";


if(mail($mail_t o,$mail_sub,$ma il_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 2173
Lumpy
69 New Member
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
Sujeetha
2 New Member
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
73773
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 SENDMAIL_FROM = NULL SENDMAIL_PATH = "H:\WINNT\system32\" (this is where sendmail.dll is sitting. H is the drive with w2k)
5
2705
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 unexpectedly.
3
3103
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 of the website from 20 mn to 60 mn. I changed the timeout setting in IIS. Now the website itself doesn't time out, however after 20 mn, when I try to access a page that needs to connect to the database, I get the following error message
12
6578
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 have added the new user to the database and have given the user access to the database for the app. But everytime I try and login using this users ID, I always get the error: Login failed for user Christian.Gaut If I login using my userid and...
5
2303
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
10824
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 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:
5
2497
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 = System.Configuration.ConfigurationSettings.AppSettings("smtpserver") mailmsg.BodyFormat = Mail.MailFormat.Text mailmsg.Subject = "My Subject"
4
2660
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 changed in php.ini SMTP=192.168.1.50 smtp_port=25 ;for win32 only sendmail_from = email_removed@your_domain.com
2
11487
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 error: SMTP -ERROR: Failed to connect to server: Permission denied (13)
0
2542
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 it necessery ? or may I have to install another program? 2- I have entered server's Ip insted of hostname.Is it correct? 3- I have creat a user in server machine with a password to connect. Am I right? 4- I use this code in clinet...
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10373
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10118
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8995
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4074
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2897
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.