【问题标题】:550 Cannot receive from specified address550 无法从指定地址接收
【发布时间】:2013-07-01 06:02:05
【问题描述】:

我按照 heroku 和 sendgrid 上的所有说明进行操作,但用户在尝试注册时收到错误消息。 我运行了日志,这是错误。 这里有什么问题?

2013-07-01 app[web.1]: Net::SMTPFatalError (550 Cannot receive from specified address <jay.mancho1@gmail.com>: Unauthenticated senders not allowed

我的设置;

config/initializers/devise.rb

  config.mailer_sender = "jay.mancho1@gmail.com"

config/environments/production.rb

config.action_mailer.default_url_options = { :host => '***.herokuapp.com' }
ActionMailer::Base.smtp_settings = {
  :address        => "smtp.sendgrid.net",
  :port           => "25",
  :authentication => :plain,
  :user_name      => ENV['***@heroku.com'],
  :password       => ENV['***'],
  :domain         => ENV['heroku.com']
}

【问题讨论】:

    标签: heroku sendgrid


    【解决方案1】:

    您需要将设置用户名和密码的行更改为ENV['SENDGRID_USERNAME']ENV['SENDGRID_PASSWORD'],而不是您的实际密码。这些值存储在服务器上,不应出现在您的代码中。

    【讨论】:

      猜你喜欢
      • 2023-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-28
      • 1970-01-01
      • 2020-07-26
      • 2021-01-20
      • 1970-01-01
      相关资源
      最近更新 更多