【问题标题】:rails, heroku devise action mailer not working - how to debug?rails,heroku 设计动作邮件程序不工作 - 如何调试?
【发布时间】:2014-11-28 01:52:03
【问题描述】:

我正在尝试为我的应用程序设置可确认的 heroku devise。这是我的代码:(遵循一些教程)

config.action_mailer.default_url_options = { :host => 'myapp.herokuapp.com' }
Rails.application.routes.default_url_options[:host] = 'myapp.herokuapp.com'

config.action_mailer.perform_deliveries = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.raise_delivery_errors = true
config.action_mailer.default :charset => "utf-8"

config.action_mailer.smtp_settings = {
address: "smtp.gmail.com",
port: 587,
domain: ENV["GMAIL_DOMAIN"],
authentication: "plain",
enable_starttls_auto: true,
user_name: ENV["GMAIL_USERNAME"],
password: ENV["GMAIL_PASSWORD"]
}

我已经为密码/域/用户名添加了 heroku 变量。但是当我尝试在我的实时网站上注册时,我收到了一个错误。

有人看到任何错误吗?或者有人可以指出我如何调试这个?谢谢!

【问题讨论】:

    标签: ruby-on-rails heroku devise gmail actionmailer


    【解决方案1】:

    Heroku 和 Gmail 在发送电子邮件时存在一些身份验证令牌问题。

    最好使用sendgridMandrill by MailChimp

    它们都是免费的,配置非常简单

    【讨论】:

      猜你喜欢
      • 2011-08-22
      • 2020-05-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多