一旦我推送到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