Implement custom logging email backend for development: log outgoing emails to Loguru and stdout
This commit is contained in:
@@ -43,7 +43,11 @@ DEBUG_TOOLBAR_CONFIG = {
|
||||
# deployment README. Adjust as needed.
|
||||
STATIC_ROOT = '/usr/src/app/static/'
|
||||
|
||||
EMAIL_BACKEND = "django.core.mail.backends.smtp.EmailBackend"
|
||||
import os
|
||||
|
||||
# Allow environment to override the email backend (so dev .env can select
|
||||
# a file-based backend while production keeps SMTP).
|
||||
EMAIL_BACKEND = os.environ.get("EMAIL_BACKEND", "django.core.mail.backends.smtp.EmailBackend")
|
||||
|
||||
if not DEBUG:
|
||||
LOGGING = {
|
||||
|
||||
Reference in New Issue
Block a user