PHPの関数mail()でメールを送信する必要があります。Reply-Toヘッダーを挿入する必要がありますが、機能しません。
<?php
$body = "<html>\n";
$body .= "<body style=\"font-family:Verdana, Verdana, Geneva, sans-serif; font-size:12px; color:#666666;\">\n";
$body = $message;
$body .= "</body>\n";
$body .= "</html>\n";
$headers = "From: My site<noreply@example.com>\r\n";
$headers .= "Reply-To: info@example.com\r\n";
$headers .= "Return-Path: info@example.com\r\n";
$headers .= "X-Mailer: Drupal\n";
$headers .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
return mail($recipient, $subject, $message, $headers); ?>
このphp.netの例には、$headers。="Reply-To:info@example.com \ r\n";があります。ただし、これをコピーして貼り付けてからメールを送信する場合、Reply-Toヘッダーはありません。From、CC、Bccなどの他のヘッダーを挿入すると、これらはHTMLメールに正しく含まれますが、Reply-Toヘッダーのみは含まれません。「Reply-to」、「Reply to」、「Reply To」、「Reply」などを試しましたが、うまくいきません。私はPhp5.4を使用していますが、役に立ちますか?