Skip to content

Instantly share code, notes, and snippets.

@ncole458
Last active January 28, 2016 10:09
Show Gist options
  • Save ncole458/b7c0a8a6b8a3510fd4ab to your computer and use it in GitHub Desktop.
Save ncole458/b7c0a8a6b8a3510fd4ab to your computer and use it in GitHub Desktop.
Mailgun for Django
"""
Mailgun is a nice option over common Gmail & can be used with a custom domain
""
# 1. setup a Mailgun account @ https://mailgun.com
# 2. add your domain & DNS records as provided on Mailgun (note: add "" around TXT records)
# 3. create new 'Route' with rules = match_recipient("[email protected]") & forward("[email protected]")
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
EMAIL_HOST = "smtp.mailgun.org"
EMAIL_HOST_USER = "SMTP_user_via_Mailgun"
EMAIL_HOST_PASSWORD = "password"
EMAIL_PORT = 587
EMAIL_USE_TLS = True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment