简体   繁体   English

设计忘记密码

[英]Devise Forgot Password

I'm trying to use Devise to handle the "Forgot Password" requests - when I click "Forgot Password," it takes me to the page to enter my email and click "Send me reset instructions." 我试图使用Devise处理“忘记密码”请求-当我单击“忘记密码”时,将带我到该页面输入我的电子邮件,然后单击“向我发送重置说明”。 But when I submit my email, I get the following error: 但是,当我提交电子邮件时,出现以下错误:

NameError in Devise::PasswordsController#create
uninitialized constant User::Mailer

I'm not sure how to fix this or how to even get to the Devise controllers code, so any help would be much appreciated. 我不确定如何解决此问题,甚至不确定如何获得Devise控制器代码,因此不胜感激。

If you trying to set up devise's "Forgot password" your set up in your environment/development.rb should look like this: 如果您尝试设置设备的“忘记密码”,则在您的环境/development.rb中的设置应如下所示:

  config.action_mailer.smtp_settings = { :address => "smtp.xxxxx.co.uk",
                                         :user_name => "username",
                                         :password => "password",
                                         :authentication => "login" }

In regards to your other your other question: SMTP Server Busy I don't see why you are you mandrill in the first place. 关于您的其他问题: SMTP服务器忙我不明白为什么您首先要进行山d操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM