diff --git a/document_merge_service/settings.py b/document_merge_service/settings.py index 1751965f..5f928a04 100644 --- a/document_merge_service/settings.py +++ b/document_merge_service/settings.py @@ -235,9 +235,22 @@ def parse_admins(admins): "level": "WARNING", "filters": None, "class": "logging.StreamHandler", - } + }, + "mail_admins": { + "level": "ERROR", + "filters": None, + "class": "django.utils.log.AdminEmailHandler", + }, }, - "loggers": {"django": {"handlers": ["console"], "level": "WARNING"}}, + "loggers": {"django": {"handlers": ["console", "mail_admins"], "level": "WARNING"}}, } URL_PREFIX = env.str("URL_PREFIX", default="") + +# Email settings +SERVER_MAIL = env.str("SERVER_MAIL", default="root@localhost") +EMAIL_HOST = env.str("EMAIL_HOST", default="localhost") +EMAIL_PORT = env.int("EMAIL_PORT", default=25) +EMAIL_HOST_USER = env.str("EMAIL_HOST_USER", default="") +EMAIL_HOST_PASSWORD = env.str("EMAIL_HOST_PASSWORD", default="") +EMAIL_USE_TLS = env.bool("EMAIL_USE_TLS", default=False)