Verify that email domain exists(验证电子邮件域是否存在)
问题描述
是否有人在验证步骤中检查电子邮件地址的域?例如.如果用户指定 blah@gmail.com 作为其地址,请确认 gmail.com 存在.
Does anyone check the domain of an email address as part of their verification steps? eg. Confirm that gmail.com exists if the user specified blah@gmail.com as their address.
我应该注意,在我的 web 应用中,现有用户可以将邀请转发给他们的朋友.我根本不需要验证这些邀请.相反,我只是想警告我的用户,如果拼写错误等可能会向错误的人发送邀请.这还值得吗?
I should note that in my webapp an existing user can forward invites to their friends. I have no need to verify those invites at all. Rather, I just want to warn my user if a typo etc. may be sending an invite to the wrong person. Is this even worthwhile to do?
推荐答案
您可以在 上进行 dns 查找mx 记录.这是代码项目中的一个示例:
http://www.codeproject.com/KB/IP/dnslookupdotnet.aspx
You could do a dns lookup on the mx record. Here's an example at Code Project:
http://www.codeproject.com/KB/IP/dnslookupdotnet.aspx
这应该可以回答您的问题,但作为旁注,我同意@Franci 的观点,即发送验证消息的旧备用方式更好.如果有人做了所有其他正确的事情来欺骗您的验证,那么您在检查域时真的不会花太多钱.
That should answer your question as asked, but as a side note I agree with @Franci that the old standby of sending a verification message is better. If someone's done everything else right to fool your validation, you're really not buying much in also checking the domain.
这篇关于验证电子邮件域是否存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:验证电子邮件域是否存在


基础教程推荐
- JSON.NET 中基于属性的类型解析 2022-01-01
- 在 VS2010 中的 Post Build 事件中将 bin 文件复制到物 2022-01-01
- 经典 Asp 中的 ResolveUrl/Url.Content 等效项 2022-01-01
- 将事件 TextChanged 分配给表单中的所有文本框 2022-01-01
- 错误“此流不支持搜索操作"在 C# 中 2022-01-01
- 全局 ASAX - 获取服务器名称 2022-01-01
- 是否可以在 asp classic 和 asp.net 之间共享会话状态 2022-01-01
- 从 VS 2017 .NET Core 项目的发布目录中排除文件 2022-01-01
- 首先创建代码,多对多,关联表中的附加字段 2022-01-01
- 如何动态获取文本框中datagridview列的总和 2022-01-01