send_email: Improve configurability for outgoing email sender name.

Currently, the sender names for outgoing emails sent by Zulip
are hardcoded. It should be configurable for self-hosted systems.

This commit makes the 'Zulip' part a variable in the following
email sender names: 'Zulip Account Security', 'Zulip Digest',
and 'Zulip Notifications' by introducing a settings variable
'SERVICE_NAME' with the default value as f"{EXTERNAL_HOST} Zulip".

Fixes: #23857
This commit is contained in:
Prakhar Pratyush
2022-12-24 22:01:48 +05:30
committed by Tim Abbott
parent 44d8dc66d2
commit d8cf12eaaa
10 changed files with 25 additions and 10 deletions

View File

@@ -574,7 +574,9 @@ def do_send_missedmessage_events_reply_in_zulip(
)
with override_language(user_profile.default_language):
from_name: str = _("Zulip notifications")
from_name: str = _("{service_name} notifications").format(
service_name=settings.INSTALLATION_NAME
)
from_address = FromAddress.NOREPLY
email_dict = {