如何在C#WPF中验证电子邮件地址 [英] How to verify email address in C# WPF

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

问题描述





我正在进行用户日志记录的身份验证,我尝试验证并验证表单中的所有详细信息。



我使用正则表达式验证电子邮件地址作为正则表达式,但也可以从我的应用程序验证它.. ???



如果可能的话,请将代码或方法发送给我。



先谢谢。

解决方案

moin pathan写道:



我使用正则表达式完成了验证部分。但我的问题是,是否有可能验证电子邮件地址是否存在或存在?

不,这是不可能的。那么,有邮件确认服务,但这只是自动交换额外的邮件以确认交付,最重要的是,邮件代理没有义务遵守确认请求。有些主机会这样做,有些则不会。即使它总是完成,也不会像你预期的那样解决你的问题。



-SA


根据我的理解,您已经完成了电子邮件地址的验证。现在您需要验证是否存在电子邮件地址?看看这些:

检查电子邮件地址是否真的存在或不使用C# [ ^ ]

如何使用ASP.NET检查givem电子邮件地址是否存在? [ ^ ]

我可以使用.net查看是否存在电子邮件地址吗? [ ^ ]

检查是否有电子邮件地址已存在 [ ^ ]

Hi,

I am working on authentication of user logging and i try to validate and verify all the details in the form.

I have use regex for validation of email address as regular expression but can also verify it from my application..???

If possible please send me the code or method to do so.

Thanks in Advance.

解决方案

moin pathan wrote:


I have done the validation part using regex. But my problem is that is it possible to verify that the email address is exist or not or alive??

No, this is impossible. Well, there is such thing as mail confirmation service, but this is nothing but automatic exchange of additional mails for the confirmation of delivery, most importantly, a mail agent is not obliged to comply with the request for confirmation. Some hosts will do it, some won't. Even it it was always done, it would not solve your problem as you expected.

—SA


Well as per my understand, you have done the validation of an email address. Now you need to verify if an email address exists or not? Take a look at these:
Check if Email Address Really Exist or not Using C#[^]
How to check the givem email address exists or not using ASP.NET?[^]
Can I check if an email address exists using .net?[^]
Checking if an email address exists[^]


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

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