开发者

Why is this mail going straight to SPAM box?

I am using the following script to send mail

<开发者_JS百科?
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.

Try this!

<?
  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."; }
?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜