我不明白Gmail作爲ActionMailer發生了什麼。在heroku中部署時不會發送任何確認電子郵件。我可以在開發中輕鬆使用它。當我使用heroku進行部署時出現問題。Gmail作爲ActionMailer部署在heroku問題
這些都是我在production.rb設置
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => 'floating-castle-4592.herokuapp.com',
:user_name => '[email protected]',
:password => ENV['PASS'],
:authentication => :login,
:enable_starttls_auto => true
}
設置在development.rb
config.action_mailer.smtp_settings = {
:address => 'smtp.gmail.com',
:port => 587,
:domain => 'gmail.com',
:authentication => :login,
:user_name => '[email protected]',
:password => ENV['PASS'],
:enable_starttls_auto => true
}
我試着換 '登錄' 與 '普通',域名: 'gmail.com' 與'blahblah.herokuapp.com'。我嘗試了所有的排列和組合。目前爲止沒有成功。我在smtp_settings中也嘗試了「:openssl_verify_mode =>'none'」選項。這並沒有帶來我的成功!我真的不明白這裏發生了什麼。
如果您需要更多信息,我會編輯帖子。
我以前發佈了無錯日誌。 參考這個職位,我深入挖掘日誌記錄級別,以找出錯誤stackoverflow.com/a/6766529/1881153
的新進展:
Heroku的日誌顯示錯誤的
ArgumentError (SMTP-AUTH requested but missing secret phrase)
任何幫助將是很大的不勝感激!謝謝!
好!刪除密碼爲'xxx'的ENV ['PASS']爲我工作。奇怪的! – nk06