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.
这篇关于验证电子邮件域是否存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:验证电子邮件域是否存在


基础教程推荐
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 如果条件可以为空 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- 将数据集转换为列表 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- 从 C# 控制相机设备 2022-01-01