0 1 0
Brett Smith - 14 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:
↑ Collapse Diff ↑
...
 
@@ -286,8 +286,11 @@ FIXTURE_DIRS = [
286 286
 

	
287 287
 
# Heroku: Get email configuration from environment variables.
288 288
 

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