如何检查给定的电子邮件地址当前是否可用? [英] How to check given email address is currently available or not ?

查看:267
本文介绍了如何检查给定的电子邮件地址当前是否可用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检查给定的电子邮件地址是否可用?

我正在使用ASP.NET创建我的研究项目&我在检查电子邮件地址是否有效时遇到问题?

我使用RegularExpressionValidator检查电子邮件,但它检查emailID的模式,例如电子邮件地址包含"@"和.".是不检查域名,或者该电子邮件是否已经存在于世界范围内.
那么如何检查给定的emailID是否有效?

如何检查给定的电子邮件地址是否可用?

How can I check to given email address is available or not ?

I am using ASP.NET to create my study project & I face problem to check if email address is valid or not ?

I use RegularExpressionValidator to check email but it checks pattern of emailID such as email address contains "@" and ".". Is doesn''t check domain name or if such email already exist in the world or not.
So how can I check if given emailID is valid or not ?

How can I check if a given email address is available or not ?

推荐答案

您可以验证给定的电子邮件ID是否符合当前结构.除此之外,鉴于有成千上万的网站可以方便地创建电子邮件帐户,因此不建议检查电子邮件地址是否有效.

如果您确实有正确的用户电子邮件ID,请发送带有链接的帐户验证邮件.除非用户验证电子邮件地址,否则不允许使用该网站.
You can validate if the given email id is as per current structure or not. Apart from that, given that there are thousands of websites facilitate creating email accounts, it is not advisable to check if the email address is valid or not.

If you are really after having a correct email id of the user, send a account verification mail with a link in it. Unless user verifies the email address, do not allow to use the website.


验证电子邮件地址有两个部分;
1.用户名或@符号左侧的位
2.地址或@符号右侧位中的域.

对于第二部分,您可以执行 DNS MX记录查找 [
There are two parts to validating an email address;
1. the username or the bit to the left of the @ symbol
2. the domain in the address or the bit to the right of the @ symbol.

For the second part you can do a DNS MX record lookup[^] however for the first item the only way to check is to send an email and checking of it bounces (assuming that the email server is configured to send bounce emails for non existent usernames).

All this is assuming that the address given complies with the rules of the regex expression for a valid email address.



这篇关于如何检查给定的电子邮件地址当前是否可用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆