PHP 脚本检查电子邮件是否有效而不发送确认
我找到了几个可以执行此操作的在线服务,并且在 stackoverflow 上找到了有关此内容的帖子:
问题是链接到那里的 PHP 脚本要求您填充名称服务器列表并域,因此(我认为)仅当您在已知域上验证电子邮件时才有效。我想要一些适用于任何电子邮件的东西(至少很有可能适用)。我发现一个脚本可以做到这一点,我可以花 40 美元购买,但我宁愿找到与开源相同的东西。
感谢您的任何建议, 约拿
I've found a couple online services that do this, and I found this post at stackoverflow about it:
How to check if an email address exists without sending an email?
The problem is that the PHP script linked to there requires you to populate a list of nameservers and domains, and thus (I think) only works if you are validating emails on a known domain. I want something that will work for any email (at least work with a high probability). I found a script that does it that I can buy for $40, but I'd rather find the same thing as open source.
Thanks for any advice,
Jonah
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这
是一个常用的电子邮件验证正则表达式,与 PHP 兼容。
只需检查电子邮件地址即可。
但请注意,如果没有确认回发,您将永远知道电子邮件是 100% 有效的。
This:
Is a well used email validation regex, which is PHP compatible.
Just check email addresses against it and you're done.
But note that without a confirmation postback you will never know that an email is 100% valid.