【问题标题】:My web app will not send confirmation emails我的网络应用程序不会发送确认电子邮件
【发布时间】:2015-06-08 05:26:35
【问题描述】:

当您创建帐户登录时,我的应用程序用于发送电子邮件确认。但是我用 rake db:reset 重置了我的数据库,现在当我创建一个新帐户时,我从未收到过电子邮件确认。因此我无法登录我的应用程序。

这是我的github https://github.com/goldmullet/bloccit

【问题讨论】:

  • 附言。我正在为我的电子邮件客户端使用 Sendgrid

标签: ruby-on-rails email sendgrid confirmation


【解决方案1】:

您可以在 /config/production.rb 中添加以下行以通过 SMTP 发送:

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

  config.action_mailer.smtp_settings = {
      address: "smtp.sendgrid.net",
      port: 587,
      authentication: "plain",
      enable_starttls_auto: true,
      user_name: ENV['SENDGRID_USERNAME'],
      password: ENV['SENDGRID_PASSWORD']
  }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-11-03
    • 1970-01-01
    • 2012-11-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-18
    相关资源
    最近更新 更多