经典 ASP 电子邮件验证电子邮件是否存在

发布于 2024-09-13 06:43:31 字数 194 浏览 3 评论 0原文

这是我找不到答案的事情。假设您有一个表单,并且在该表单上有一个字段供某人输入其电子邮件地址。现在输入电子邮件地址后,有没有办法在使用 RegEx 后验证它是否遵循电子邮件地址的语法,然后验证它是否是可以接收消息的有效电子邮件? 我查遍了整个网络,发现了一种已弃用的方法,该方法已被补丁停止,所以我想知道是否没有办法在服务器上执行此操作,可能轮询 smtp 服务器或其他东西。

Here's something I couldn't find an answer to. Say you have a form and on that form you have a field for someone to enter their e-mail address. Now after the e-mail address is entered, is there a way after using RegEx to verify that it follows the syntax of an e-mail address, to then verify that it is a valid e-mail that can receive messages?
I looked all over the net and found a deprecated way to do it that has since been stopped by patches, so I was wondering if there wasn't a way to do it on the server maybe polling the smtp server or something.

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

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

发布评论

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

评论(1

少女净妖师 2024-09-20 06:43:31

如果您想验证用户是否犯了错误(或者因为他们对您的消息不感兴趣而给您提供了虚假地址),您可能应该执行其他系统所做的操作:不要激活帐户(或其他),直到您通过单击链接或输入电子邮件包含的代码来验证用户已收到电子邮件。

您需要这样做,因为您可能永远不会收到电子邮件地址无效的指示 - 某些服务器配置为丢弃一些(或全部)无效电子邮件地址或将它们转储到垃圾邮件箱中。仅仅因为电子邮件似乎已成功发送并不意味着它是有效的或它已发送给正确的人。

If you're looking to verify that the user hasn't made a mistake (or is giving you a bogus address because they aren't interested in your messages), you should probably do what every other system does: don't activate the account (or whatever) until you get some verification that the user has gotten the email by clicking a link or entering a code that the email contains.

You need to do this because you might never get an indication that an email address is invalid - some servers are configured to throw away some (or all) invalid email addresses or dump them in a spam bin. Just because the email appears to have been successfully sent doesn't mean it's valid or that it's getting to the right person.

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