Issue
I want to setup the Mailgun add-on for Django on Heroku
Resolution
You can use Mailgun as an SMTP relay; there is more information about that here.
Fortunately, when using Heroku, all of the necessary Mailgun variables are stored as environmental variables. You can update your Heroku-side settings.py
file with the following variables; Django emails should "just work".
EMAIL_HOST = os.environ.get('MAILGUN_SMTP_SERVER', '')
EMAIL_PORT = os.environ.get('MAILGUN_SMTP_PORT', '')
EMAIL_HOST_USER = os.environ.get('MAILGUN_SMTP_LOGIN', '')
EMAIL_HOST_PASSWORD = os.environ.get('MAILGUN_SMTP_PASSWORD', '')