在 PHP 中检查有效且正在使用的电子邮件地址

发布于 2024-08-27 05:54:40 字数 258 浏览 4 评论 0原文

我不确定这是否完全可能,但我想我会把它扔在那里。

我有一个客户,他通过我为他开发的网站上的联系表收到了一些他认识的人发来的仇恨邮件。目前,我对格式有效的电子邮件地址以及验证码进行正常检查,但客户要求用户在表单中输入他/她自己的电子邮件地址。

现在我意识到,通过设置一个假的雅虎帐户等可以很容易地欺骗类似的事情,但客户的想法是这个人不太懂计算机。

是否可以检查电子邮件地址是否有效且正在使用? 我唯一能想到的就是将他的联系表格变成 mailto: 链接。

I'm not sure if this is exactly possible, but figured I'd throw it out there.

I have a client that is getting some hate-mail from somebody he knows via a contact form on a website that I developed for him. Currently I do the normal checks for a validly-formatted email address, along with a Captcha, but the client has requested that a user enter his/her own email address in the form.

Now I realize that something like this could be easily spoofed by setting up a fake Yahoo account, etc, but the client's thinking is that this person is not quite that computer-literate.

Is there any possibility for checking if an email address is valid and in-use?
The only other things I can think of is turning his contact form into a mailto: link.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

深空失忆 2024-09-03 05:54:40

确认电子邮件地址正在使用的唯一方法是向其发送带有唯一令牌的电子邮件,并让他们将令牌传回给您(通常通过单击链接)。这通常是邮件列表注册的工作方式。

SMTP 协议中有一些理论上的方法可以区分,但是由于垃圾邮件发送者滥用这些方法,许多(甚至可能是大多数)服务器并不尊重这些方法。

The only way to confirm an email address is in use is to send an email to it with a unique token, and have them pass the token back to you (usually by clicking a link). This is typically how mailing list signups work.

There are theoretical ways to tell in the SMTP protocol, but many (or maybe even most) servers don't respect those due to problems with spammers abusing them.

生寂 2024-09-03 05:54:40

尽管它可能不起作用,但我发现 Akismet ( http://akismet.com/ ) 在阻止垃圾邮件方面相当出色,并且表单和评论中不需要的电子邮件。

如果失败并且问题只是一个人,您可以通过 IP 甚至浏览器指纹列入黑名单 ( http://www.h-online.com/security/news/item/EFF-demonstrates-a-browser-s-finger- print-918786.html )最终,即使有人专注,也无法阻止他们。

Although it may not work, I find Akismet ( http://akismet.com/ ) fairly good at blocking spam and unwanted emails in forms and comments.

If that fails and the problem is only one individual you can blacklist by IP, or even by browser fingerprint ( http://www.h-online.com/security/news/item/EFF-demonstrates-a-browser-s-finger-print-918786.html ) Ultimately it is impossible to stop someone though if they are dedicated.

星光不落少年眉 2024-09-03 05:54:40

如果邮件中包含一些常用的滥用词语或滥用者的 IP 地址,为什么不直接发送此电子邮件呢?

Why not just not send this email if message contains some commonly used abuse word or abusers IP address?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文