Skip to content

SendGrid not relaying emails from Klaxon when using the Heroku setup #404

@harrislapiroff

Description

@harrislapiroff

I was trying to get this set up on Heroku using the one-click process. I had to go through the SendGrid rigamarole listed in the README, but even then I wasn't receiving the confirmation email when I attempted to log in. I dug into the logs and found this entry:

[ActiveJob] [ActionMailer::DeliveryJob] [ef565f89-dc0b-4535-9904-f123e268ba3f] Error performing ActionMailer::DeliveryJob (Job ID: ef565f89-dc0b-4535-9904-f123e268ba3f) from Async(mailers) in 577.69ms: Net::SMTPFatalError (550 The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements

It appears that Klaxon is sending the confirmation email from the address Klaxon <[email protected]> and SendGrid is rejecting it since it's not a verified sender on my account. I'm not sure what the general solution is here, but here's how I resolved it:

  1. Went through SendGrid support process to get my account unsuspended, as specified in the readme

  2. From the SendGrid dashboard, created a verified sender using my personal email address. Clicked the confirmation link from my email when received.

  3. From the SendGrid dashboard, provisioned an API key for Klaxon.

  4. From Heroku, updated env vars as follows:

    SENDGRID_USERNAME = apikey
    SENDGRID_PASSWORD = API key from SendGrid
    MAILER_FROM_ADDRESS = My personal email address

I'm not sure that provisioning the API key and updating the username/password was a necessary part of this process, but it seemed like a wise thing to do.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions