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
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
Comment