生成随机密码并通过电子邮件发送吗? [英] generate random password and email it?

查看:152
本文介绍了生成随机密码并通过电子邮件发送吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...
我想生成随机密码并将其保存到数据库,还希望将该密码发送到用户的邮件ID以便登录过程...
有可能吗?

hi...
i wanna generate random password and save it database and also want to send that password to user''s mail id for the login process...
is there any possible for it?
any idea?

推荐答案

Random rnd = new Random();
rnd.Next(100000, 999999);



该代码将在指定范围之间生成一个随机的6位数字.
您可以通过电子邮件将其发送给您的用户.

要发送电子邮件,请阅读给定的文章...点击链接...

使用ASP.NET 2.0的简易SMTP邮件 [通过ASP发送电子邮件. NET [^ ]

如果解决您的问题,则标记为答案



the code will generate a random number of 6 digits, between specified range.
you can send it to your user through email.

to send email read the given articles... follow the links...

Easy SMTP Mail Using ASP.NET 2.0[^]

Sending Email through ASP. NET[^]

mark as answer if solves your problem


这些链接可以帮助您生成随机密码.
http://www.obviex.com/Samples/Password.aspx

http://madskristensen.net/post/Generate-random-password-in-C.aspx

在这里,您将了解基本的Ado.Net操作.
入门指南,介绍如何通过C#访问SQL Server

这是用于.Net中的电子邮件发送.
http://social.msdn.microsoft.com/Forums/zh/netfxnetcom/thread/a75533eb-131b-4ff3-a3b2-b6df87c25cc8
These links may help you to generate random password.
http://www.obviex.com/Samples/Password.aspx

http://madskristensen.net/post/Generate-random-password-in-C.aspx

Here you will get idea of basic Ado.Net operations.
Beginners guide to accessing SQL Server through C#

This is for Email Sending in .Net.
http://social.msdn.microsoft.com/Forums/en/netfxnetcom/thread/a75533eb-131b-4ff3-a3b2-b6df87c25cc8


这篇关于生成随机密码并通过电子邮件发送吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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