我在网站上使用简单的联系表格和脚本。我唯一的问题是,当我收到他们的提交时,我希望填写表格的人的电子邮件用作电子邮件地址的回复,而不是我的服务器地址。这样我就可以简单地回复联系人,而不必复制和粘贴他们的地址并开始新的电子邮件回复。
有什么简单的方法可以做到这一点吗?
下面是我正在使用的简单代码。
<?php
header('Location: http://XXXXXXXXXXXXXXXXX/contact.html');
$name = $_REQUEST['Person'];
$company = $_REQUEST['company'];
$address = $_REQUEST['address'];
$city = $_REQUEST['city'];
$state = $_REQUEST['state'];
$zip = $_REQUEST['zip'];
$email = $_REQUEST['email'];
$phone = $_REQUEST['phone'];
$subject = $_REQUEST['subject'];
$details = $_REQUEST ['details'];
$byphone = $_REQUEST ['Phonebox'];
$emailbox = $_REQUEST['Emailbox'];
$message = "From $name\n Company $company\n Address $address\n $city $state $zip\n Email $email\n Phone $phone\n Subject $subject\n\n Details $details\n\n Contact by $byphone $emailbox";
mail ("XXXXXXXXX.com", "Customer Inquiry", "$message", "$email");
?>