Added more information to docs about SHOW_ADMIN_EMAIL

This commit is contained in:
petermaksymo 2021-12-16 19:07:29 -05:00
parent 08c045e98f
commit 06a39f45f4
2 changed files with 4 additions and 2 deletions

View file

@ -85,7 +85,8 @@ emails.
## SHOW_ADMIN_EMAIL
A boolean that determines whether the admin email (`MAIL_DEFAULT_SENDER`) is
shown in error messages.
shown in error messages. This also needs `MAIL_DEFAULT_SENDER` to be set to a
non default value to show it in the error messages.
- **Default value:** `True`
- **Production value:** Usually `True` unless you don't want the admin

View file

@ -49,7 +49,8 @@ def send_email(mail_message):
def flash_email_error(error_message, category="danger"):
"""Helper to flash a message for email errors. It will also show the
admin email as a contact if SHOW_ADMIN_EMAIL is True.
admin email as a contact if MAIL_DEFAULT_SENDER is set to not the
default value and SHOW_ADMIN_EMAIL is True.
"""
admin_email = current_app.config.get("MAIL_DEFAULT_SENDER")
error_extension = "."