如何向用户发送电子邮件以使用自定义数据库重置密码mvc 5 [英] how do I send an email to user to reset password mvc 5 with custom database

查看:68
本文介绍了如何向用户发送电子邮件以使用自定义数据库重置密码mvc 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我对MVC很新。我在业余时间创建了一个新项目,试图加快速度。我没有使用asp.net身份表,但我通过自己的用户和角色表使用身份。



我现在想发送一封邮件到用户,如果他们忘记了密码,但我只在谷歌上看到asp.net身份表的内容。



有没有办法用我自己的桌子完成这个?



谢谢

Hi,

I am very new to MVC. I have created a new project in my spare time to try and get up to speed. I am not using the asp.net identity tables but I am using identity through my own users and roles tables.

I a now want to send out a mail to the user if they forgot their password but I only see things on google for asp.net identity tables.

Is there any way of accomplishing this with my own tables?

thanks

推荐答案

使用Entity Framework访问数据库中的数据,使用SmtpClient发送电子邮件。< br $> b $ b

https://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient(v = vs.110).aspx [ ^ ]



谷歌有关实体框架的教程等,这是一个很大的主题。
Use Entity Framework to access the data in your database and SmtpClient to send the emails.

https://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient(v=vs.110).aspx[^]

Google for tutorials etc on Entity Framework, it's a big subject.


这篇关于如何向用户发送电子邮件以使用自定义数据库重置密码mvc 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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