PHP Mail回复 - 未设置

时间:2014-04-28 05:11:48

标签: php

我使用以下内容发送电子邮件,但没有设置回复地址,我无法找出原因。

$name = $_POST['name'];
$email = $_POST['email_addr'];
$phone = $_POST['phone'];
$body = $_POST['body'];

$body = stripslashes($body);

$message = "Email from site.\n\n
From: $name\n
Email: $email\n
Phone: $phone\n\n
Message: $body";

$to      = 'darren@mysite.com';
$subject = 'From Site';
$message = $message;
$headers = 'From: ' . $email . "\r\n" .
'Reply-To: ' . $email . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);

我错过了一些明显的东西吗?

0 个答案:

没有答案