あなたはこのようなあなたのメールにHTMLを使用することができます。
<?php
$to = "[email protected], [email protected]";
$subject = "HTML email";
$message = "<a href='http://example.com/PhpProject3/reset_passwd.php?key=".$email."&userid=".$userid."' style=' background-color: #4CAF50;border: none;color: white;padding: 15px 32px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px;'>Click To Reset password</a>";
$message .= "Other Information ";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
// More headers
$headers .= 'From: <[email protected]>' . "\r\n";
$headers .= 'Cc: [email protected]' . "\r\n";
mail($to,$subject,$message,$headers);
?>
をお試しくださいはい、ボタンのように見えます。だからあなたの質問は何ですか? –
@shrithi質問は正しくありません。あなたはメールをHTMLコンテンツにする必要があると思います。その中にパスワードをリセットするためのリンクボタンが必要ですか? – Darshan
ヘッダー付きのメールを試しましたか? –