我有这个脚本,它会发送一封电子邮件供用户在我的网站上激活他们的帐户,它的工作正常我唯一的问题是它发送消息正文两次,有人能看到并解释原因吗?
$toemail = $_POST['produgg_email'];
// Send activation email
$to = $toemail;
$subject = "Website Activation";
$headers = "From: support@website\r\n" .
$body = "To activate your website.co.uk please click <a href='http://www.website.co.uk/activateuser.php?email=$toemail'>here</a>";
if (mail($to, $subject, $body, $headers)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
答案 0 :(得分:4)
您已粘贴代码?如果是这样,你有一个点而不是一个;在第5行......