Using Mailgun in Heroku

How do you use Mailgun in the Heroku production environment for transactional emails?

I’ve already successfully implemented SendGrid for transactional emails. I’ve written up the whole procedure at https://gist.github.com/jhsu802701/a7ac8d4ccdc5d993a61a9de293f104df .

What’s the proper procedure for using Mailgun? There’s something missing from Heroku’s procedure. I’ve tried changing the config/environments/production.rb file, but the production email still doesn’t work. The project in question is at https://github.com/jhsu802701/tmp-heroku-2017-02-09-1833 .

When I enter “heroku logs”, the error message I get is:
Net::SMTPFatalError (554 Sandbox subdomains are for test purposes only. Please add your own domain or add the
address to authorized recipients in Account Settings.