様々なサイトを見て、Sendgridを使ってメールを送ろうと設定していますが、herokuの自サイトからメール送信をしても、メールが届きません。
(エラーなどは出ません)
ただ、Activity Feedを確認しましたが、No data to displayという表示になっていて、メールが送信された履歴が無い状態です。
gbg.net/archives/3039](08505db30e1807dbe26eaaa99bf73b0c.png)
API keyも取得しました。
参考にしたサイトは以下の通り。
https://devcenter.heroku.com/articles/sendgrid
https://blog.bgbgbg.net/archives/3039
https://qiita.com/negi3d/items/2714534897f90915d392
production.rb
production.rb
1 config.action_mailer.default_url_options = { :host => 'https://xxxxxxxxxx.herokuapp.com/' } 2 config.action_mailer.raise_delivery_errors = false #この一文も追記!! 3 config.action_mailer.delivery_method = :smtp 4 config.action_mailer.smtp_settings = { 5 :address => "smtp.sendgrid.net", 6 :port => 587, 7 :authentication => :plain, 8 :user_name => "xxxxxx@heroku.com", 9 :password => "xxxxxxx", 10 :domain => "heroku.com", 11 :enable_starttls_auto => true
development.rb
development.rb
1 config.action_mailer.default_url_options = { host: 'localhost:3000', port: 3000 } 2 config.action_mailer.raise_delivery_errors = true 3 config.action_mailer.delivery_method = :smtp 4 config.action_mailer.smtp_settings = { 5 :enable_starttls_auto => true, 6 :address => "smtp.gmail.com", 7 :port => 587, 8 :domain => 'smtp.gmail.com', 9 :user_name => "xxxxxxx@gmail.com", #ご自身のgmailアドレス 10 :password => "xxxxxx", #ご自身のgmailアドレスのパスワード 11 :authentication => 'login' 12 }
これはどういった原因が考えられるのか、ご教示いただけませんでしょうか。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/12/05 21:23
2017/12/05 23:27
2017/12/06 03:41
2017/12/06 03:43
2017/12/06 03:48
2017/12/06 03:58
2017/12/06 06:06
2017/12/11 12:39