1

I'm using BlueHost and I can't seem to get my email form to work. This is the PHP:

$to = "test@email.com";
$subject = "test";
$message = "test message";
$from =  $_POST['cf_email'];
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo $headers;

This doesn't seem to send the email. However, if I add ANY string in front of the email, then it works. e.g.:

$from =  "zz".$_POST['cf_email'];

Can anyone tell me what I'm doing wrong? Thanks.

4

1 回答 1

0

您不能在“发件人”标题中使用任何个人电子邮件 ($_POST['cf_email'])。您还必须添加“回复”。

请检查下面的线程以获取更多信息。

php邮件“发件人”标头的问题

于 2013-01-18T14:23:48.403 回答