我为客户构建了一个简单的 php 脚本给我发电子邮件,效果很好。但我想在脚本中添加一个自动响应:
Thank you for your interest. We will get back to you as soon as possible.
Sincerely,
(My Name)
这是我已经在使用的脚本:
// ******* PROCESS EMAILS
$emailSubject = '*** Business Lead - '.$_POST['full_name'].' ***';
$webMaster = 'my@email.com';
//Gather Info
$leadname = $_POST['full_name'];
$leademail = $_POST['email'];
$leadphone = $_POST['phone'];
$leadip = $_SERVER['REMOTE_ADDR'];
$body = <<<EOD
<br><hr><br>
<b>***** $emailSubject ***</b><br>
<br><hr><br>
<b>Name:</b><br>
$leadname <br><br>
<b>Email:</b><br>
$leademail <br><br>
<b>Phone:</b><br>
$leadphone <br><br>
<b>IP Address:</b><br>
$leadip <br><br>
EOD;
$headers = "From: $leademail\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
// ******* PROCESS EMAILS
有什么我可以添加到这个已经添加到不是太 mcuh 代码的文本中的吗?先感谢您。:)