From ff047ca88181dc5028d1b397cd45e27308260799 Mon Sep 17 00:00:00 2001 From: Sjoerd Schipper Date: Mon, 26 Feb 2024 13:06:58 +0100 Subject: [PATCH 1/2] Add email environment variables --- src/objects/conf/base.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/objects/conf/base.py b/src/objects/conf/base.py index 6f1e9eb8..18365e22 100644 --- a/src/objects/conf/base.py +++ b/src/objects/conf/base.py @@ -366,6 +366,20 @@ "REMOTE_ADDR", ) +# +# Sending EMAIL +# +EMAIL_HOST = config("EMAIL_HOST", default="localhost") +EMAIL_PORT = config( + "EMAIL_PORT", default=25 +) # disabled on Google Cloud, use 487 instead +EMAIL_HOST_USER = config("EMAIL_HOST_USER", default="") +EMAIL_HOST_PASSWORD = config("EMAIL_HOST_PASSWORD", default="") +EMAIL_USE_TLS = config("EMAIL_USE_TLS", default=False) +EMAIL_TIMEOUT = 10 + +DEFAULT_FROM_EMAIL = config("DEFAULT_FROM_EMAIL", "objects@example.com") + # Sentry SDK SENTRY_DSN = config("SENTRY_DSN", None) From 9b24977d72fddbb22193d71c84f789c79e623a4d Mon Sep 17 00:00:00 2001 From: Sjoerd Schipper Date: Mon, 26 Feb 2024 16:42:54 +0100 Subject: [PATCH 2/2] :fire: Duplicate email envvars --- src/objects/conf/base.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/objects/conf/base.py b/src/objects/conf/base.py index 18365e22..fce6fdcd 100644 --- a/src/objects/conf/base.py +++ b/src/objects/conf/base.py @@ -203,9 +203,6 @@ FIXTURE_DIRS = (os.path.join(DJANGO_PROJECT_DIR, "fixtures"),) -DEFAULT_FROM_EMAIL = "objects@example.com" -EMAIL_TIMEOUT = 10 - LOGGING_DIR = os.path.join(BASE_DIR, "log") LOGGING = {