【发布时间】:2013-01-20 00:45:29
【问题描述】:
我的用户可以通过电子邮件邀请其他人加入他们正在从事的项目,但我不断收到以下错误-
Net::SMTPAuthenticationError
这是我为生产环境配置邮件设置的方式
config.action_mailer.default_url_options = { :host => 'myapp.herokuapp.com' }
#Sending email on the production side
config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => "587",
:domain => "gmail.com",
:authentication => :plain,
:user_name => "example@gmail.com",
:password => "password"
}
它像我期望的那样在我的本地环境中使用 sqlite3,但是当我推送到 heroku 时,它会在运行 heroku 日志后引发上述错误。我相信我的配置设置是正确的,显然 heroku 使用 postgresql,所以我在这里缺少什么?
感谢您的关注。
【问题讨论】:
标签: ruby-on-rails postgresql heroku devise actionmailer