0
我已经做了配置的该位为SendGrid准确的教程,搜索了很多答案,仍然得到试图推到Heroku的时候这个错误:RoR SendGrid配置错误,不允许部署到Heroku;第10章哈特尔
NameError: undefined local variable or method `auto' for #<SampleApp::Application:0x007f5c8bdaef78>
线扔了错误:
:enable_starttls_auto => true
从配置/ environments.rb全码:
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
host = 'gentle-sands-4285.herokuapp.com'
config.action_mailer.default_url_options = { host: host }
ActionMailer::Base.smtp_settings = {
:address => 'smtp.sendgrid.net',
:port => '587',
:authentication => :plain,
:user_name => ENV['SENDGRID_USERNAME'],
:password => ENV['SENDGRID_PASSWORD'],
:domain => 'heroku.com',
:enable_starttls_auto => true
}
非常感谢所有帮助,并希望将有助于ŧ o其他人通过教程学习。