0

電子メールを送信するための遅延したジョブはキューに入れられ、heroku ログに従って正しく処理されますが、実際には電子メールを受信しません。同じsmtp設定でローカルで期待どおりに機能するため、何が問題なのかわかりません。

ログからの抜粋は次のとおりです。

キューイング:

2015-08-28T08:46:46.935402+00:00 app[web.1]: [ActiveJob] Enqueued ActionMailer::DeliveryJob (Job ID: 9e9e8110-ee2f-4562-9a03-b1f482d56c7c) to Resque(mailers) at 2015-08-28 08:47:46 UTC with arguments: "UserMailer", "thank_you", "deliver_now!", "xxx@gmail.com"

処理:

    2015-08-28T08:47:50.912636+00:00 app[scheduler.1]: 2015-08-28 08:47:50 Processing Delayed Items
2015-08-28T08:47:54.637690+00:00 app[worker.1]: [ActiveJob] [ActionMailer::DeliveryJob] [9e9e8110-ee2f-4562-9a03-b1f482d56c7c] Performing ActionMailer::DeliveryJob from Resque(mailers) with arguments: "UserMailer", "thank_you", "deliver_now!", "xxx@gmail.com"
2015-08-28T08:47:54.658354+00:00 app[worker.1]: [ActiveJob] [ActionMailer::DeliveryJob] [9e9e8110-ee2f-4562-9a03-b1f482d56c7c]   Rendered user_mailer/thank_you.html.erb within layouts/mailer (2.7ms)
2015-08-28T08:47:55.294365+00:00 app[worker.1]: [ActiveJob] [ActionMailer::DeliveryJob] [9e9e8110-ee2f-4562-9a03-b1f482d56c7c] Performed ActionMailer::DeliveryJob from Resque(mailers) in 656.38ms
2015-08-28T08:47:54.932032+00:00 app[worker.1]: [ActiveJob] [ActionMailer::DeliveryJob] [9e9e8110-ee2f-4562-9a03-b1f482d56c7c]
2015-08-28T08:47:54.932073+00:00 app[worker.1]: UserMailer#thank_you: processed outbound mail in 290.2ms

production.rb と development.rb の SMTP 設定:

 config.action_mailer.delivery_method = :smtp


 # SMTP settings for gmail
  config.action_mailer.smtp_settings = {
   :address              => "smtp.gmail.com",
   :port                 => 587,
   :user_name            => ENV['gmail_username'],
   :password             => ENV['gmail_password'],
   :authentication       => "plain",
  :enable_starttls_auto => true
  }
4

1 に答える 1