Skip to content

Commit

Permalink
Use ENV variables for FROM in mails
Browse files Browse the repository at this point in the history
To allow mails from testservers we need to be able to configure FROM headers.
  • Loading branch information
gpkvt authored and pajowu committed Dec 11, 2023
1 parent 76a24ae commit ddb06b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fragdenstaat_de/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def TEMPLATES(self):

CUSTOM_AUTH_USER_MODEL_DB = "auth_user"

DEFAULT_FROM_EMAIL = "FragDenStaat.de <info@fragdenstaat.de>"
DEFAULT_FROM_EMAIL = env(DEFAULT_FROM_EMAIL, "FragDenStaat.de <info@fragdenstaat.de>")
EMAIL_BACKEND = "fragdenstaat_de.theme.email_backend.CustomCeleryEmailBackend"
CELERY_EMAIL_BACKEND = "froide.foirequest.smtp.EmailBackend"
# EMAIL_HOST
Expand Down Expand Up @@ -272,9 +272,9 @@ def TEMPLATES(self):
_base_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
SENTRY_JS_URL = env("DJANGO_SENTRY_PUBLIC_DSN")

SERVER_EMAIL = "info@fragdenstaat.de"
SERVER_EMAIL = env(SERVER_EMAIL, "info@fragdenstaat.de")

SITE_EMAIL = "info@fragdenstaat.de"
SITE_EMAIL = env(SITE_EMAIL, "info@fragdenstaat.de")
SITE_ID = 1
SITE_NAME = "FragDenStaat"
SITE_URL = env("SITE_URL", "https://fragdenstaat.de") or "https://fragdenstaat.de"
Expand Down

0 comments on commit ddb06b2

Please sign in to comment.