drllqg2903 2015-02-17 21:25
浏览 104
已采纳

在发送电子邮件之前,正在检查电子邮件正文中的URL

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.

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

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向