Ruby on rails 邮件发送don';行不通

Ruby on rails 邮件发送don';行不通,ruby-on-rails,devise,actionmailer,Ruby On Rails,Devise,Actionmailer,在我的应用程序中为用户使用设备。在开发模式下,所有这些都可以正常工作,但在生产中试用时,我遇到了问题。我的config/environments/production.rb config.action_mailer.raise_delivery_errors = true config.action_mailer.delivery_method = :smtp config.action_mailer.default_url_options = {host: 'radiant-journ

在我的应用程序中为用户使用设备。在开发模式下,所有这些都可以正常工作,但在生产中试用时,我遇到了问题。我的
config/environments/production.rb

config.action_mailer.raise_delivery_errors = true
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.default_url_options = {host: 'radiant-journey-52383.herokuapp.com'}
  config.action_mailer.smtp_settings = {
      user_name:      ENV['SENDMAIL_USERNAME'],
      password:       ENV['SENDMAIL_PASSWORD'],
      domain:         ENV['PROD_MAIL_HOST'],
      address:       'smtp.gmail.com',
      port:          '587',
      authentication: :plain,
      enable_starttls_auto: true
  }

我做错了什么?

是否有任何可见的错误?@Luke没有在页面上键入“对不起”,但出了问题。如果您是应用程序所有者,请查看日志以了解更多信息。您可以测试radiant-Travely-52383.herokuapp.complete检查应用程序llogMake确保您已为heroku-
ENV['SENDMAIL\u USERNAME']
上的环境变量指定了正确的值您是否正在尝试通过GMAIL发送邮件?
Please use domain: 'gmail.com'
use port number with url
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.default_url_options = {host: 'radiant-journey-52383.herokuapp.com', port: 3000}
config.action_mailer.smtp_settings = {
      user_name:      ENV['SENDMAIL_USERNAME'],
      password:       ENV['SENDMAIL_PASSWORD'],
      domain:         'gmail.com',
      address:       'smtp.gmail.com',
      port:          '587',
      authentication: :plain,
      enable_starttls_auto: true
}