Home>

rails tutorial 4th edition Chapter 11 I want to add SendGrid add-on to heroku.
11.4 SendGrid cannot be added when sending emails in the production environment.
The error message only says Please try again later.
I also checked heroku logs, but nothing came out and I am not sure how to solve it...

ec2-user:~/environment/sample_app (master) $heroku addons:create sendgrid:starter
Creating sendgrid:starter on ⬢ rails-serene-sampleapp...!
 ▸ An error was encountered when contacting the add-on
 ▸ partner to create sendgrid:starter. Please try again
 ▸ later.
/sample_app/config/environments/production.rb
config.action_mailer.raise_delivery_errors = true
  config.action_mailer.delivery_method = :smtp
  host ='https://rails-serene-sampleapp.herokuapp.com'
  config.action_mailer.default_url_options = {host: host}
  ActionMailer::Base.smtp_settings = {
    :address =>'smtp.sendgrid.net',
    :port =>'587',
    :authentication =>:plain,
    :user_name =>ENV['SENDGRID_USERNAME'],
    :password =>ENV['SENDGRID_PASSWORD'],
    :domain =>'heroku.com',
    :enable_starttls_auto =>true
  }
What I tried

I looked back through the tutorial to see if there was any omission in the code, and also tried adding an addon from the heroku dashboard, but I was unable to add it, with the message below.
Item could not be created:
An error was encountered when contacting the add-on partner to create sendgrid:starter. Please try again later.

Supplementary information

The environment is as follows.
ruby 2.6.3p62
Rails 5.1.6
AWS Cloud 9

If i am a beginner and have a hard time asking questions, please point out.
Please let me know if you have any other information you need to solve it.
Thanks for your cooperation.

  • Answer # 1

    >Can you solve the problem below
    >Rails Tutorial Chapter 11 Solving SendGrid Freezing Problem-Qiita
    >https://qiita.com/yuppymam/items/50f893df99cfb1683234

    When I saw the error content in heroku logs, it was a different message.

    Net::SM>Quote text TPFatalError (550 Unauthenticated senders not allowed

    This message may occur because the Addon registration is an error.

  • Answer # 2

    I was in the same situation, but I skipped the execution in the production environment of Chapter 11, and proceeded to Chapter 12, and I was able to add on this morning. I'm guessing that the reason I was able to add on this morning despite the same situation is one of the following.

    1. Bug due to standing time? An error like
    2. You can avoid the error by proceeding to Chapter 12.

    In the former case, the contributor may be able to add on by trying again. In the latter case, the contributor may be able to add on after proceeding to Chapter 12.

    I'm not sure if the poster can solve the same problem, but I'd be happy if it helped a little. Mutual rails tutorial Let's do our best!

  • Answer # 3

    Sorry for the answer.
    I am in exactly the same situation.
    ・Email arrives when SendGrid registration is completed on August 18, 2020
    ・2020/8/19 heroku addons:create command error
    ・2020/8/20 Error when re-executing heroku addons:create command

    I am also doing a Rails tutorial.

  • Answer # 4

    Doesn't it help with

    Rails Tutorial Chapter 11 Solve the SendGrid Freezing Problem-Qiita
    https://qiita.com/yuppymam/items/50f893df99cfb1683234

  • Answer # 5

    Many similar phenomena have been seen recently

    It's not an essential solution, but you may want to try again later
    Even if Chapter 11 of the Rails tutorial is not completed, it is recommended that you proceed to Chapter 12.

    django-Heroku/sendgrid can't install this addon-Stack Overflow
    https://stackoverflow.com/questions/63398523/heroku-sendgrid-cant-install-this-addon

    Ruby on Rails-I want to add a SendGrid addon to heroku. rails tutorial Chapter 11|stackoverflow

    Ruby-I can't add Sendgrid to heroku, so I can't use devise's email function. .. .. |stackoverflow