验证电子邮件地址 [英] verifying email address

查看:136
本文介绍了验证电子邮件地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何确认电子邮件地址是否确实存在!!!!!!



请提交参考链接或详细代码。

How can I verify if the email address does actually exist or not!!!!!!

please submit a reference link or details code.

推荐答案

正如谢尔盖所说,这是不可能的。



所以,如果你要验证电子邮件ID是否格式正确,您可以尝试如何:验证字符串是否为有效的电子邮件格式 [ ^ ]。



如果您正在执行 ASP.NET 项目,然后您也可以使用 JavaScript 正则表达式来完成此操作。您可以通过在 Google 上搜索来轻松获得表达。
As Sergey says, this is not possible.

So, if you want to validate whether Email Id is in correct format or not, you can try the method suggested at How to: Verify that Strings Are in Valid Email Format[^].

If you are doing ASP.NET Project, then you can also do this using JavaScript with Regular Expressions. You can easily get the Expression by searching on Google.


您不能。这不是邮件协议的工作方式。原则上,有一种方法:发送请求确认递送的邮件,该邮件在用户打开邮件时自动发送。但首先,这不是你想要的,其次,并非所有的邮件代理商,特别是邮件客户端都会遵循这个要求。



充其量,你可以ping主机拥有邮件地址。它不会告诉你邮件地址本身是否真实。



-SA
You cannot. This is not how mail protocols works. In principle, there is one way: send a mail requesting a confirmation of delivery, which is automatically sent when a user opens a mail. But first, this is not what you want, secondly, not all mail agents and especially mail clients will follow this request.

At best, you can ping the host owning the mail address. It won't tell you if the mail address itself actual or not.

—SA


SqlConnection con= new SqlConnection("DataSource:xxxxxx ......");
SqlCommand cmd=  new SqlCommand("select * from TABLE_NAME where Email = "xyz@abc.com", con);
SqlDataAdapter da= new SqlDataAdapter(cmd);
DataTable dt= new DataTable();
da.fill(dt);

if(dt.Rows.Count > 0)
{
 MessageBox.Show("email address already exists");
}


这篇关于验证电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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