【发布时间】:2019-07-05 23:09:27
【问题描述】:
我试图在我的电子邮件正文中使用一个链接,但没有这样做,每当我发送电子邮件时,电子邮件都会发送,但它只包含纯文本,但我也想打印一个链接,以便该链接将将我重定向到另一个页面。
这是我的 php 代码,
<?php
include("admin/config.php");
$email=$_POST['email'];
/// mail to customer
$to=$email;
$subject="Thanks for Contacting with us";
// Message
$message = '
<html>
<head>
<title>Request to Change Password</title>
</head>
<body>
<p>You have requested to change password <br> Please follow the below link to change your password.<br><br></p>
<p><a href="http://www.example.com/update-password.php">Change Password</a><br><br></p>
<p>Regards<br></p>
<p>http://www.example.com<br></p>
<p>9999999999<br></p>
</body>
</html>
';
$from = 'MIME-Version: 1.0' . "\r\n";
$from.= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$from.= 'From: <no-reply@abc@gmail.com>' . "\r\n";
$mail =mail($to,$subject,$message,$from);
if ($mail == true){
header('location:forgot_password.php');
}
?>
请帮帮我,提前谢谢
【问题讨论】: