提交联系表格和php电子邮件发送到垃圾邮件为什么邮件进入垃圾邮件

时间:2018-12-07 10:43:29

标签: php email phpmyadmin contacts

这是代码

$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>";
}

0 个答案:

没有答案