我正在使用 PHP 发送电子邮件,但所有电子邮件都进入垃圾邮件文件夹。请告诉我我在哪里犯了错误。
<?
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$message=$_POST['message'];
$ToEmail = "me@example.com";
$ToSubject = "Message from your site";
$EmailBody = "Name: $name\n
Email: $email\n
Phone: $phone\n
Message: $message\n";
$Message = $EmailBody;
$headers .= "Content-type: text; charset=iso-8859-1\r\n";
$headers .= "From:".$name." / ".$email."\r\n";
mail($ToEmail,$ToSubject,$Message, $headers);
header("location: thankyou.php");
?>