Skip to content

Instantly share code, notes, and snippets.

@ncole458
Last active January 28, 2016 10:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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("you@yourdomain.com") & forward("anyone@domain.com")
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