What exactly does Jumpstart setup for Sendgrid?

So I'm a bit confused as to what exactly Jumpstart sets up when I select "Sendgrid" in the Jumpstart email configuration. I selected it and Jumpstart restarted but I don't see anything in production.rb or environment.rb related to Sendgrid. Am I still suppose to follow Sendgrid's website instructions and put the following in environment.rb or was Jumpstart suppose to create all this?

ActionMailer::Base.smtp_settings = {
  :user_name => 'apikey', # This is the string literal 'apikey', NOT the ID of your API key
  :password => '<SENDGRID_API_KEY>', # This is the secret sendgrid API key which was issued during API key creation
  :domain => 'yourdomain.com',
  :address => 'smtp.sendgrid.net',
  :port => 587,
  :authentication => :plain,
  :enable_starttls_auto => true
}

And then am I suppose to add the Sendgrid add-on to Heroku? Because when I do it creates it's own "SENDGRID_PASSWORD" and "SENDGRID_USERNAME" and enters those automatically into the Config Vars. So that's confusing. Do I need to copy those and enter those into my credentials as well?


John Quarto-vonTivadar
all i had to do was put the keys generated over on Sendgrid into your .ENV file (or set up on your Heroku dashboard Env variables).  That worked out of the box for emails the app sends and for account confirmation signups thru Devise etc. BUT ... and no one mentioned this but it eventually came up ... if you're sending *invite* emails to join an Account, for some reason those are set to be sent via a queue in Sidekiq name "mailer". I can't explain why this one needed that specific queue name but the confirmation emails did not.
Notifications
You’re not receiving notifications from this thread.
© 2022 GoRails, LLC