我正在使用 php 中的 mail() 函数发送带有此 html 内容的 html 邮件:
<a href="http://localhost/#/confirm?key=$confirmationLink">
http://localhost/#/confirm?key=$confirmationLink</a>
在hotmail中的href输出如下: http://localhost/#/confirm%3fkey%3df327e518193e515f7c8226a006d0bc5934 ,当我点击链接时不起作用。
它在 gmail 中运行良好,其输出 href 为: http://localhost/#/confirm?key=ee9b70ca92c47210525743a4e7ab112535
如何让它在 Hotmail 中工作?
这就是我使用 mail() 函数的方式:
$to = 'blbl@blblb.dk';
$from = 'contact@bla.dk';
$subject = 'blabla';
$message = <<<EOD
<html>
<body>
<pre>
To get started please verify your account by clicking this link:
<a href="http://localhost/#/confirm?key=$confirmationLink">http://localhost/#/confirm?key=$confirmationLink</a>
</pre>
</body>
</html>
EOD;
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
$mail = mail($to, $subject, $message, $headers);