need help with mail()
Posted: Wed May 31, 2006 11:11 am
someone please help me with the configuring of my smtp server. thanks alot.
Code: Select all
if ($_POST["custEmail"] != "")
{
$ticketNo = $_POST["ticketNo"];
$custname = $_POST["custName"];
$custemail = $_POST["custEmail"];
$subject = $_POST["subject"];
$content = $_POST["content"];
$department = $_POST["department.clicked"];
$to = $_POST["custEmail"];
$subject = "Toshiba Service Center";
$message = "
<html>
<head></head>
<body>
Hi ".$custname."
<p>
Your problem has been referred to the respective department. This email contains your ticket number. If you have any enquiry, feel free to call us with your ticket number. Your ticket number is as shown below:
<br>
<strong>Ticket Number: ".$ticketNo."</strong>
<p>
Thanks & Regards,<br>
Toshiba Service Center";
$from = "hr@toshiba.com.sg";
$headers = "From: cs@toshiba.com.sg\nReply-To: cs@toshiba.com.sg\nContent-Type: text/html; charset=iso-8859-1";
mail($to, $subject, $message, $headers);
echo "
<center>
<form action=pms.php method=Post>
<table width=100% border=0 cellpadding=4 cellspacing=0>;
<tr>
<td><Strong>Email sent.</strong></td>
</tr>
<tr>
<td><input type=submit value=Done src=pms.php /></td>
</tr>
</table>
</form>
</center>";
}
else
{
echo "
<center>
<form action=pms.php method=Post>
<table width=100% border=0 cellpadding=4 cellspacing=0>
<tr>
<td><Strong>Email not sent. Please click on the back button to go back to the form.</strong></td>
</tr>
<tr>
<td><input type=submit value=Back src=pms.php /></td>
</tr>
</table>
</form>
</center>";
}
?>Code: Select all
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:\Program Files\xampp\htdocs\pmsDone.php on line 35
;
Email sent.