Changeset - 1aa1daf3f67d
[Not reviewed]
0 1 0
Brett Smith - 17 months ago 2019-09-30 15:20:23
brettcsmith@brettcsmith.org
settings: Make EMAIL_BACKEND more flexible.
1 file changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general)
pinaxcon/settings.py
Show inline comments
...
 
@@ -286,8 +286,11 @@ FIXTURE_DIRS = [
 

	
 
# Heroku: Get email configuration from environment variables.
 

	
 
EMAIL_BACKEND = "email_log.backends.EmailBackend"
 
EMAIL_LOG_BACKEND = os.environ.get("DJANGO_EMAIL_BACKEND", "django.core.mail.backends.console.EmailBackend")  # noqa
 
EMAIL_BACKEND = os.environ.get(
 
    "DJANGO_EMAIL_BACKEND",
 
    "django.core.mail.backends.{}.EmailBackend".format('console' if DEBUG else 'smtp'),
 
)
 
EMAIL_LOG_BACKEND = "email_log.backends.EmailBackend"
 
EMAIL_HOST = os.environ.get("DJANGO_EMAIL_HOST", "")
 
EMAIL_PORT = int(os.environ.get("DJANGO_EMAIL_PORT", 25))
 
EMAIL_HOST_USER = os.environ.get("DJANGO_EMAIL_HOST_USER", "")
0 comments (0 inline, 0 general)