这是代码
$name = $_POST['name'];
$emailRecipient = $_POST['emailRecipient'];
$msg = $_POST['message'];
$subject = $_POST['subject'];
$headers = "From: $emailRecipient\r\n";// Message lines should not exceed 70 characters (PHP rule), so wrap it$msg = wordwrap($msg, 100);// Send Mail By PHP Mail Function
if(@mail("awais.increate@gmail.com",$name,$subject,$msg,"fawais.increate@gmail.com"))
{
$message = "Message Sent to Admin";
echo "<script type='text/javascript'>alert('$message');</script>";
}
else{
$message = "Message Not Sent toAdmin";
echo "<script type='text/javascript'>alert('$message');</script>";
}