devise がパスワードを忘れたという問題に直面しています。devise は「数分以内にパスワードをリセットする方法についての指示が記載された電子メールを受け取ります」というメッセージを表示しますが、電子メールを受信していません。
Ruby-1.9.3 Rails 3.2 デバイス 2.2.4
私の環境/development.rb
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default :charset => "utf-8"
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:authentication => :plain,
:domain => 'xyz@gmail.com',
:user_name => 'xyz@gmail.com',
:password => 'abcde',
}
私の環境.rb ActionMailer::Base.delivery_method = :smtp
私の初期化子/devise.rb
config.mailer_sender = "xyz@gmail.com"
そして development.log ショー
Sent mail to xyz@gmail.com (3205ms)
Date: Wed, 26 Jun 2013 23:33:01 +1000
From: xyz@gmail.com
Reply-To: x@gyzmail.com
To: xyz@gmail.com
Message-ID: <51caed8dd99a5_15365823b9268927@nbnco-U01.mail>
Subject: Reset password instructions
Mime-Version: 1.0
Content-Type: text/html;
charset=UTF-8
Content-Transfer-Encoding: 7bit
<p>Hello xyz@gmail.com!</p>
<p>Someone has requested a link to change your password. You can do this the link below.</p>
<p><a href="http://localhost:3000/users/password /edit?reset_password_token=zb1mZUEzxpymqE8qorDJ">Change my password</a></p>
<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>
Redirected to http://localhost:3000/users/sign_in
Completed 302 Found in 3423ms (ActiveRecord: 0.0ms)