忘记登录密码在本地工作,但不在现场工作

时间:2013-09-30 16:24:04

标签: ruby-on-rails devise postmark

一旦我推送到heroku我无法重置密码.......使用设计和邮戳

我的devise.rb文件:

  config.mailer = "UserMailer" # mailerCLASS

development.rb /production.rb

ActionMailer::Base.smtp_settings = {
  :port           => '25',
  :address        => ENV['POSTMARK_SMTP_SERVER'],
  :user_name      => ENV['POSTMARK_API_KEY'],
  :password       => ENV['POSTMARK_API_KEY'],
  :domain         => 'agile-eyrie-1022.herokuapp.com',
  :authentication => :plain,
}
ActionMailer::Base.delivery_method = :smtp

我的user_mailer.rb

    class UserMailer < ActionMailer::Base
  include Devise::Mailers::Helpers

  default from: "default@mydomain.com"

  def reset_password_instructions(record, opts={})
       devise_mail(record, :reset_password_instructions)
     end
   end

0 个答案:

没有答案