我有一个非常奇怪的问题.我正在使用PHP,在我的PHP代码中,我编写了电子邮件内容并生成了这个链接:
....
<a href="http://www.domain.com/act.php?id=' . $userid . '&key=' . $actkey . '">http://www.domain.com/act.php?id=' . $userid . '&key=' . $actkey . '</a>
....
Run Code Online (Sandbox Code Playgroud)
大多数时候,它工作正常.然后,我收到很多投诉说他们无法激活.检查完他们的电子邮件后,我发现了这个:
<a href="http://www.domain.com/act.php?id=20090=hsdf87hsf89sd">http://www.domain.com/act.php?id=20090=hsdf87hsf89sd'</a>
Run Code Online (Sandbox Code Playgroud)
缺少"&key".为什么?非常奇怪的虫子!
完整的PHP命令:
$content = '<div style="font-family:Calibri; color:#333;">
Hi there, <br><br>
Thank you for register to our website, click the following link to activate your account:<br><br>
<a href="http://www.domain.com/act.php?id=' . $userid . '&key=' . $actkey . '">http://www.domain.com/act.php?id=' . $userid . '&key=' . $actkey . '</a><br><br>
XXX Team</div>';
Run Code Online (Sandbox Code Playgroud)
Gumbo可能是对的,我的电子邮件内容是基于HTML的:
$headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
Run Code Online (Sandbox Code Playgroud)