为什么这个邮件直接进入垃圾箱? [英] Why is this mail going straight to SPAM box?

查看:153
本文介绍了为什么这个邮件直接进入垃圾箱?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下脚本发送邮件。

I am using the following script to send mail

<?
extract($_POST);
$subject = "Feedback from ".$name." (".$email.", Ph: ".$phone.")";
$mail = @mail($send,$subject,$content);
if($mail) { echo "Your feedback has been sent"; }
else { echo "We are sorry for the inconvienience, but we could not send your feedback now."; }
?>

但是这总是在垃圾邮件文件夹中。为什么?

But this is always ending up in the spam Folder. Why?

推荐答案

您发送邮件时必须使用标题,以证明邮件从真实来源到达,而不是

You have to use headers while you send mail, to prove that the mail arrives from a genuine source and not a bot.

尝试这个!

<?
  extract($_POST);
  $subject = "Feedback from ".$name." (".$email.", Ph: ".$phone.")";
  $headers  = 'MIME-Version: 1.0' . "\r\n";
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  $headers .= 'From:'.$email."\r\n";
  $headers .= 'Reply-To: '.$email;
  $mail = @mail($feedback,$subject,$content,$headers);
  if($mail) { echo "Your feedback is send"; }
  else { echo "We are sorry for the inconvienience, but we could not send your feedback now."; }
?>

这篇关于为什么这个邮件直接进入垃圾箱?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆