开发者

PHP Send Mail duplicating body

开发者 https://www.devze.com 2023-03-09 01:12 出处:网络
开发者_高级运维I have this script which sends an email for users to activate their accounts on my website, its working fine my only problem is that its sending the body of the message twice, Can anybo
开发者_高级运维

I have this script which sends an email for users to activate their accounts on my website, its working fine my only problem is that its sending the body of the message twice, Can anybody see and explain why?

$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>");
 }


You have pasted the code? If so, you have a dot instead of a ; at line 5...

0

精彩评论

暂无评论...
验证码 换一张
取 消