Skip to content

Instantly share code, notes, and snippets.

@doismellburning
Created May 25, 2012 01:23
Show Gist options
  • Save doismellburning/2785254 to your computer and use it in GitHub Desktop.
Save doismellburning/2785254 to your computer and use it in GitHub Desktop.
Django settings for SendGrid
EMAIL_BACKEND='django.core.mail.backends.console.EmailBackend'
if os.getenv('SENDGRID_USERNAME') is not None:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.sendgrid.net'
EMAIL_HOST_USER = os.getenv('SENDGRID_USERNAME')
EMAIL_HOST_PASSWORD = os.getenv('SENDGRID_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