-3

クライアントが私にメールを送信するための簡単な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

あまりコードではないテキストに追加するために、これに追加できるものはありますか? 前もって感謝します。:)

4

1 に答える 1

4

それは次のようになります。

$message = "Thank you for your interest. We will get back to you as soon as possible.<br />Sincerely,<br />(My Name)";
$subject = "Confirmation";

$headers2 = "From: $webMaster\r\n";
$headers2 .= "Content-type:  text/html\r\n";
mail($leademail, $subject, $message, $headers2);
于 2012-09-19T21:32:33.400 に答える