我如何...发送链接将密码设置为邮件ID [英] How do I...Send a link to set password into mail id

查看:137
本文介绍了我如何...发送链接将密码设置为邮件ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何重置我的登录密码以在注册的邮件ID中发送链接。即我现在有一个网站我想创建一个代码,以便当我请求更改或重置我的密码时,它会发送一个链接到我的邮件ID,该链接在我的数据库中或使用asp .net C#代码注册。

解决方案

这需要一些工作,但这是值得的。

首先,不要重置密码 - 不要立即执行任何操作。

然后发送电子邮件(简单:使用或不使用附件在C#中发送电子邮件:通用例程。 [ ^ ])

电子邮件中包含一条消息我们收到了密码重置请求您的帐户。如果您提出了此请求,请单击此处:xxx如果您没有,请执行任何操作并提供页面的URL,以及访问请求数据库表的唯一代码TS。该页面然后要求用户确认,并且是否允许他输入新密码。

如果他没有在24小时内点击该链接,则代码将过期并在日常维护中被删除

how to reset my loging password to send a link in a registred mail id. i.e. I have a web site now I want to create a code so that when I requested to change or reset my password it send a link to my mail id which is in my database or registered using asp .net C# code.

解决方案

This takes a bit of work, but it's worth it.
First off, don't reset the password - do nothing with it immediately.
Then send an email (Easy: Sending an Email in C# with or without attachments: generic routine.[^])
The email contains the a message saying "We have received a password reset request on your account. If you requested this, click here: xxx If you didn't, do nothing" and providing a URL to a page, along with a unique code which accesses a DB table of requests. That page then asks the user to confirm, and if he does allows him to enter a new password.
If he doesn't click the link in 24 hours, the code expires and gets deleted in routine maintenance.


这篇关于我如何...发送链接将密码设置为邮件ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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