验证电子邮件域是否存在

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.

这篇关于验证电子邮件域是否存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)