We've moved discussions to Discord

Issues Deploying Sendgrid to Heroku

Martin Curiel
I am having a heck of a time deploying my transactional email service, Sendgrid, to Heroku. It seems like all I have to do is edit this in the production credentials file and I should be good to go:

sendgrid:
          # https://app.sendgrid.com/settings/api_keys
          username: 'apikey'
          password: ''
          domain: example.com

I've also tried to put things directly on Heroku via the config variables. Has anyone else run into issues with this?
Jason Ackerman
I was having some trouble with this but just got it up and running. I never used the api key (not sure if this is right or not). When I provisioned the Sendgrid Add-On in Heroku it automatically created environment variables in Heroku for SENDGRID_USERNAME and SENDGRID_PASSWORD. You can get these variables from the Settings section of your Heroku app (they're hidden by default but can be made visible). The values for these environment variables are what I put into the production credentials file and it worked. Does this work for you?
Martin Curiel
Hi  Jason Ackerman  Thank you so much for the reply. So what you are saying is that all you did is fill out username and password fields on the credentials file?
Jason Ackerman
Yes (from the environment variables created by Heroku when you provision the Sendgrid addon), and the domain both in the credentials file and in the jumpstart config so that emails with links (e.g. invitations) use the correct domain.
Martin Curiel
Jason Ackerman  That worked. Another issue that I found where I went into a rabbit hole is that I was using SendGrid's WebAPI integration (since it's says "recommended" on the home screen). Instead, one should use SMTP Relay. It took me a few hours, but I finally figured it out. Love this forum and what Josh does.
Jack Riminton
I've been following the above advice but now the error I'm getting on Heroku is: "Net::SMTPAuthenticationError (535 Authentication failed: account disabled"

Seems I can't verify my account until I send an email but I can't send an email because my account is disabled!

Anyone got a workaround? I may just choose another email provider but my god this is painful
Notifications
You’re not receiving notifications from this thread.