From bf442eb4b7ce15eac5b9661d8e4ba3e8ba39f7ee Mon Sep 17 00:00:00 2001 From: monosans Date: Wed, 25 Dec 2024 15:10:41 +0300 Subject: [PATCH] add DEFAULT_FROM_EMAIL setting --- .env.example | 3 ++- config/settings/production.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 69587780..4e227dd9 100644 --- a/.env.example +++ b/.env.example @@ -41,9 +41,10 @@ REDIS_PORT=6379 # ------------------- # https://docs.djangoproject.com/en/5.1/ref/settings/#email-host +DEFAULT_FROM_EMAIL=user@localhost EMAIL_HOST=localhost EMAIL_HOST_PASSWORD=password -EMAIL_HOST_USER=user +EMAIL_HOST_USER=user@localhost EMAIL_PORT=25 EMAIL_USE_TLS=False EMAIL_USE_SSL=False diff --git a/config/settings/production.py b/config/settings/production.py index 9f152b32..e076be2f 100644 --- a/config/settings/production.py +++ b/config/settings/production.py @@ -29,6 +29,7 @@ CSRF_COOKIE_SECURE = True CSRF_COOKIE_NAME = "__Secure-csrftoken" +DEFAULT_FROM_EMAIL = env.str("DEFAULT_FROM_EMAIL") EMAIL_HOST = env.str("EMAIL_HOST") EMAIL_HOST_PASSWORD = env.str("EMAIL_HOST_PASSWORD") EMAIL_HOST_USER = env.str("EMAIL_HOST_USER")