default to noreply if MAIL_FROM is not set #221

This commit is contained in:
rimu 2024-06-26 17:24:07 +08:00
parent e14dee66e2
commit c179a28ca1

View file

@ -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