0

次のコードを使用して確認メールを送信していますが、メールのurlパラメータが削除され、メールのURLのようなhttp://example.com/confirm.php?user_id=パラメータ値(1)が削除されている理由がわかりません

$headers = "From: admin@example.com \n";
    $headers .= "X-Mailer: PHP/SimpleModalContactForm";
    $headers .= "MIME-Version: 1.0\n";
    $headers .= "Content-type: text/html; charset=utf-8\n";
    $headers .= "Content-Transfer-Encoding: quoted-printable\n";

    $subject = "Confirm Your Registration Example.com";
    $subject = mb_encode_mimeheader($subject, "UTF-8", "B", "\n");
    $to="abc@demo.com";
    $body="<table> <tr> <td> Hello </td> </tr>";
    $body.="<tr> <td> Please confirm your registration by clicking following link  <td> </tr>";
    $body.="<tr> <td>  http://example.com/confirm.php?user_id=1</td> </tr>";

    $body.="</table>";


    @mail($to, $subject, $body, $headers) or  die("Unfortunately, a server issue prevented delivery of your message.");
4

2 に答える 2

0

次のようなタグで試しましたか

    <a href="http://example.com/confirm.php?user_id=1">http://example.com/confirm.php?user_id=1</a>
于 2012-07-16T06:00:33.950 に答える
0

解決済み、ヘッダーを変更した

$headers = "From: admin@example.com \n";
$headers .= "X-Mailer: PHP/SimpleModalContactForm";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=utf-8\n";
$headers .= "Content-Transfer-Encoding: quoted-printable\n";

$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers .= 'From: admin@example.com' . "\r\n";
于 2012-09-11T07:22:53.277 に答える