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.

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

报告相同问题?

悬赏问题

  • ¥15 在若依框架下实现人脸识别
  • ¥15 网络科学导论,网络控制
  • ¥100 安卓tv程序连接SQLSERVER2008问题
  • ¥15 利用Sentinel-2和Landsat8做一个水库的长时序NDVI的对比,为什么Snetinel-2计算的结果最小值特别小,而Lansat8就很平均
  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同