From c179a28ca1b6c03d1c8dc6bad9e6425d36bb84d1 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Wed, 26 Jun 2024 17:24:07 +0800 Subject: [PATCH] default to noreply if MAIL_FROM is not set #221 --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.py b/config.py index ad005b97..bc6e8a50 100644 --- a/config.py +++ b/config.py @@ -16,7 +16,7 @@ class Config(object): MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS') is not None MAIL_USERNAME = os.environ.get('MAIL_USERNAME') or None MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD') or None - MAIL_FROM = os.environ.get('MAIL_FROM') or None + MAIL_FROM = os.environ.get('MAIL_FROM') or 'noreply@' + os.environ.get('SERVER_NAME') MAIL_ERRORS = os.environ.get('MAIL_ERRORS') is not None ADMINS = os.environ.get('ADMINS') RECAPTCHA_PUBLIC_KEY = os.environ.get("RECAPTCHA_PUBLIC_KEY") or None