Skip to content

Instantly share code, notes, and snippets.

@tclancy
Created July 12, 2013 19:01
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 tclancy/5986873 to your computer and use it in GitHub Desktop.
Save tclancy/5986873 to your computer and use it in GitHub Desktop.
Sending Email from Django. Need to have SERVER_EMAIL and DEFAULT_FROM_EMAIL set. If you don't set the latter, no admin mail gets sent.
EMAIL_HOST = 'smtp.server.net'
EMAIL_HOST_USER = 'user'
EMAIL_HOST_PASSWORD = 'p@ssword'
DEFAULT_FROM_EMAIL = 'forms@exmaple.com'
SERVER_EMAIL = 'forms@example.com'
# for SSL only
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