SendGrid on Heroku

0

Not sure why everything I looked online makes it look complicated but this worked. And you don't even need to add the SendGrid gem.

/config/environments/production.rb
  config.action_mailer.delivery_method = :smtp
  ActionMailer::Base.smtp_settings = {
    address:              'smtp.sendgrid.net',
    port:                  587,
    domain:               'yourdomain.com',
    user_name:             'apikey',
    password:              ENV['SENDGRID_API_KEY'],
    authentication:       'plain',
    enable_starttls_auto:  true
  }

  • 0 posts
  • 0 subtopics
  • 3 months ago by vince