drllqg2903 2015-02-17 21:25
浏览 104


I am having an issue trying to create an email verification link. I add the lin k in the body of the email, and when that url is visited, it verifies the emial using the parameters in the url. However, when the email is sent, it visits that link automatically, and verifies it. Does anyone know why it does this, or what I am doing wrong?

Here's my code

$to = $_POST['email'];
$subject = "";
$headers = "From: email@example.com" . "
$headers .= "Reply-To: email@example.com
$headers .= "MIME-Version: 1.0
$headers .= "Content-Type: text/html; charset=ISO-8859-1
$message = "<html><body><p>Here's a message</p>";
$message .= '<a href="http://www.example.com/verification.php?mv6e='.$encode.'&cv6v='.$verification.'">Click here to verify your application</a></body></html>';
mail($to, $subject, $message, $headers);

This should set a field in a database to "Verified". However, when the email is sent, the field is set to "Verified" before the user can even click on the link. Which gives me the impression that something is visiting the link beforehand. Any insight would be greatly appreciated.

  • 写回答

1条回答 默认 最新

  • dongzhiqi0332 2015-02-17 21:33

    Might be a spam filter that checks the links in all emails. For example, gmail scans all emails for links to malicious websites.

    You can add a recaptcha to the verification page to make sure it is visited by a human, not some spam filtering bot.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥20 集成电路的逻辑电路和晶体管简化图
  • ¥15 下载windows builder后的问题
  • ¥15 按要求对程序的逻辑进行更正
  • ¥50 悬赏帮写C++编程 诚信
  • ¥15 端口连接数为什么会有限制
  • ¥15 安卓数据提交之后格式不对
  • ¥15 需要数据库运行的图片
  • ¥15 如何获取vue-video-editor?
  • ¥100 vs2019 mfc程序如何实现64*64/48*48大小的真彩色工具栏
  • ¥15 全志v3s耳机音频输出口怎么外接功放