0
在生產中,我的Rails應用程序不會發送電子郵件。我正在使用Heroku。我看過similar post,但答案並沒有幫助我。電子郵件不會從使用Mandrill的Rails應用程序發送
它適用於Gmail,但不適用於Mandrill。
的Gmail:
config.action_mailer.default_url_options = { host: 'app.herokuapp.com', :protocol => 'http' }
config.action_mailer.smtp_settings = {
address: "smtp.gmail.com",
port: 587,
user_name: ENV['USERNAME'],
password: ENV['PASSWORD']
}
山魈:
config.action_mailer.default_url_options = { host: 'app.herokuapp.com', :protocol => 'http' }
config.action_mailer.smtp_settings = {
address: "smtp.mandrillapp.com",
port: 25,
user_name: ENV['USERNAME'],
password: ENV['API_KEY']
}
另外請注意,我已經嘗試切換端口號!