,當我試圖通過sendgrid在Heroku上雪松堆棧發送一封電子郵件, 我得到了一個以下錯誤:錯誤SendGrid在Heroku上雪松堆棧
ArgumentError (SMTP-AUTH requested but missing user name):
我在/environments/staging.rb設置爲:
config.action_mailer.delivery_method = :smtp
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default_url_options = { :host => 'myapp' }
ActionMailer::Base.smtp_settings = {
:address => "smtp.sendgrid.net",
:port => "587",
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => 'heroku.com'
}
我Sendgrid密碼/用戶名從Heroku的根據this page
沒有人有任何建議得到?
你有沒有設置RAILS_ENV和RACK_ENV是「分期」通過' heroku'cli? – 2012-07-11 07:34:40
確認你已經通過'heroku config'設置了你的SendGrid證書。 – 2012-07-11 11:03:33
是的,我將RAILS_ENV和RACK_ENV設置爲'暫存'。但我無法發送郵件.. – jwako 2012-07-12 10:21:47