当他从Windows窗体注册时,向用户发送验证码电子邮件地址. [英] Sending a Verification code to users Email address when he registers from windows forms.
问题描述
大家好,
我开发了一个Windows窗体应用程序,员工可以通过提供必要的凭据来进行注册.因此,每当他在验证后提供他的电子邮件地址,我都需要向他的电子邮件地址发送一个验证码...并且一旦他在他注册的表格...
注意:
我无法将验证码存储在数据库中...我必须通过在全局类中编写属性来使用此功能...请帮助我,因为我不知道如何执行此操作...任何帮助不胜感激.
请您在发帖时在代码旁写些小注释...因为我是初学者.
谢谢
Hello Everyone,
I Developing a windows forms application using which an employee can register by providing his neccesary credentials.so whenever he provides his email address after the validation i need to send a verification code to his email address...and once he enters that verification address in the form he is registered...
NOTE:
i cannot store the verification code in database...i have to do this using properties by writing it in a global class...please help me out as i have no clue whatsoever how i have to do this...any help would be appreciated.
plz write small comments near the code whenever ur posting...because im a beginner.
Thank You
推荐答案
亲爱的朋友,
您可以借助GUID类来生成验证码并将其发送给用户,因为GUID代码始终会生成唯一的六位数数字.
现在,借助哈希表,您可以将用户EMAILID及其验证码存储起来,然后可以检查验证码的有效性.
请参考以下链接以获取更多详细信息:-
哈希表:-
http://www.dotnetperls.com/hashtable
http://www.homeandlearn.co.uk/csharp/csharp_s7p7.html
GUID :-
http://www.c-sharpcorner.com/uploadfile/prasoonk/guids-in-C-Sharp-and-net/
http://msdn.microsoft.com/en-us/library/system.guid. newguid.aspx
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=335
如果您有帮助,请不要忘记将其标记为答案.
谢谢
Varun Sareen
Dear Friend,
You can take the help of GUID class for generating the verification code and sending it to user, as the GUID code always generate a unique sixtenn digit number.
Now with the help of hashtable you can store the user EMAILID with their verification code and can thereafter check the validity of the verification code.
Please refer the following link for more details:-
HashTable:-
http://www.dotnetperls.com/hashtable
http://www.homeandlearn.co.uk/csharp/csharp_s7p7.html
GUID:-
http://www.c-sharpcorner.com/uploadfile/prasoonk/guids-in-C-Sharp-and-net/
http://msdn.microsoft.com/en-us/library/system.guid.newguid.aspx
http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=335
Please don''t forget to mark this as your answer if it helps you out.
Thanks
Varun Sareen
这篇关于当他从Windows窗体注册时,向用户发送验证码电子邮件地址.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!