From 06a39f45f450f18c8e4a7d78fadc347b2c48c32b Mon Sep 17 00:00:00 2001 From: petermaksymo Date: Thu, 16 Dec 2021 19:07:29 -0500 Subject: [PATCH] Added more information to docs about SHOW_ADMIN_EMAIL --- docs/configuration.md | 3 ++- ihatemoney/utils.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/configuration.md b/docs/configuration.md index 722b7cd8..8303dabf 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -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 diff --git a/ihatemoney/utils.py b/ihatemoney/utils.py index b035db8f..bc063f2d 100644 --- a/ihatemoney/utils.py +++ b/ihatemoney/utils.py @@ -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 = "."