我创建了一个使用此脚本的电子邮件表单:
<?php
foreach ($_POST as $field=>$value)
{
$formcontent .= "$field: $value\n";
}
$formcontent .= 'User-Agent: '.$_SERVER['HTTP_USER_AGENT'];
$recipient = "andrew.***y@***********.co.uk";
$subject = "Event feedback form";
$mailheader = "From: web.form@**********.co.uk\r\n";
$mailheader .= "Reply-To: $email\r\n";
$mailheader .= "MIME-Version: 1.0\r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Failure!");
header("location:http://www.**********.co.uk");
?>
这以非常容易逐行阅读的方式格式化邮件,但客户希望它看起来更像它来自的表单!即使我可以用水平规则将线条分开并对齐响应,这也是可行的——这甚至可能吗?
谢谢吉姆