1

I am using Rails 4 with Devise on Heroku, plus SendGrid for sending e-mails.

The mailer is generally set up correct: When a User signs up, it requires Admin approval, for which I receive e-mails.

However, when trying to request password reset instructions (via mydomain.com/users/password/new), I get Heroku's frustrating message "We're sorry, but something went wrong". No mail ever gets sent. SendGrid doesn't even register a request, so the app doesn't even get that far.

The last thing shown in the logs is:

2016-11-15T09:14:37.209243+00:00 heroku[router]: at=info method=POST path="/users/password"

I am not even sure how to track this issue down. Can anybody help?

EDIT: I should note that if I enter a non-existing e-mail address, I get redirected to the view telling me so, bypassing the error I get when I enter an existing e-mail address.

rubykatz
  • 278
  • 3
  • 12

1 Answers1

1

Never mind. I increased logging detail level by altering production.rb:

config.logger = Logger.new(STDOUT)
config.logger.level = Logger::DEBUG

Turns out I only needed to add the following line to my production.rb:

config.action_mailer.default_url_options = { host: 'mydomain.com' }
rubykatz
  • 278
  • 3
  • 12