邮件功能没有响应链接

时间:2015-12-15 15:33:02

标签: php

有人可以提供帮助,我试图发送一封电子邮件,一旦注册符合用户的一切正常,除了显示为的链接:

<a href=" http://176.35.232.280/appxailon.com/cgi-bin/admin/rego.php?passkey='.$activation.'">Activate account</a>

但我想只显示Activate account。请帮忙!!!

// Send the email:
$to = $email;
$subject = "Registration Conformation:Upperbit";
$from = 'Support@upperbit.com';
$body = "Hi"." $first ,"."\n\n";
$body .= "This is an automated message from Upperbit.Please dont reply to it."."\n\n";
$body .= "If you have recently signed up with us then please click on the below activation link to activate your account."."\n\n";
$body .= '<a href=" http://176.35.232.280/appxailon.com/cgi-bin/admin/rego.php?passkey='.$activation.'">Activation account</a>'."\n\n";
$body .= "if didn't intend to register with us please simply disregard this email."."\n"."-----------"."\n";
$body .= "Best regards,"."\n"."Upperbit Team";
// To send HTML mail, the Content-type header must be set
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
// Additional headers
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";
$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";
$sentmail = mail($to,$subject,$body,$header);

1 个答案:

答案 0 :(得分:0)

在邮件中发送代码

$sentmail = mail($to,$subject,$body,$headers);

并在rego.php

$value = $_GET['passkey'];

if (isset($value)) {
    echo "Key is".$value;
}
else{
    echo "Error in setting paskey";
}