如何验证用户输入的邮件是否正确? [英] How to Verify User enterd mail is Correct or not?
问题描述
Hi Team,
在我的申请中,我正在使用电子邮件。哪个可以发送新的电子邮件,接收,转发等..
我不想要电子邮件ID验证(就像它有@,。com / .in等..)
我需要验证电子邮件是否存在于任何地方?,
意味着,就像我们在CodeProject中注册一样。注册时我们将提供我们的MailID。所以CodeProject服务器检查是否正确并将验证发送到我们的邮件。
谢谢
Dileep(实习软件开发人员)
Hi Team,
In my application I''m using Email. Which can send new email, receive, forward etc..
I don''t want Email Id validation(like is it has @, .com/.in etc..)
I need to Verify is that email exist anywhere ?,
Means, like our registration in CodeProject . while registration we will provide our MailID. so CodeProject server check is it correct or not and sends the verification to our mail.
Thanks
Dileep(Trainee software developer)
推荐答案
除了向其发送电子邮件并获得回复之外,您无法通过任何方式验证电子邮件。 (所有这一切都是检查电子邮件地址是否存在于那个时刻:有些是有时间限制的,例如在十分钟后自动过期)。
我是什么(和许多其他人一样)做的是发送一封电子邮件,其中包含指向网页的完整注册链接。该链接包括标识发起者的查询字符串。例如,Guid值与数据库中等待完成表中的guid绑定:
You can''t verify an email by any means other than to send an email to it and get a response back. (And all that does is check that the email address exists at that moment in time: some are time limited and automatically expire after ten minutes for example).
What I (and many others) do is send an email, with a "complete registration" link to a webpage. The link includes a query string which identifies the originator. For example, a Guid value which ties back to a guid in your "waiting completion" table in your db:
www.MyDomain.com/regComplete.apsx?cc=84cb21dc-bcdb-428a-958b-42c959dcdb78
或者在查询字符串中包含userID:
Or include the userID in the query string:
www.MyDomain.com/regComplete.aspx?uid=102322&cc=84cb21dc-bcdb-428a-958b-42c959dcdb78
在网页中,您读取查询字符串,检查用户和Guid并将其标记为已确认。
In the web page, you read the query string, check the user and Guid and mark it as confirmed.
这篇关于如何验证用户输入的邮件是否正确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!