mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 04:23:46 +00:00
send_email: Remove display_name from reply_to for a noreply address.
Better to see "noreply@..." when replying to a message that you can't reply to than to see "Zulip" (for email clients that hide the email address when there is a display name).
This commit is contained in:
@@ -44,6 +44,11 @@ def build_email(template_prefix, to_email, from_name=None, from_address=None,
|
||||
reply_to = None
|
||||
if reply_to_email is not None:
|
||||
reply_to = [reply_to_email]
|
||||
# Remove the from_name in the reply-to for noreply emails, so that users
|
||||
# see "noreply@..." rather than "Zulip" or whatever the from_name is
|
||||
# when they reply in their email client.
|
||||
elif from_address == FromAddress.NOREPLY:
|
||||
reply_to = [FromAddress.NOREPLY]
|
||||
|
||||
mail = EmailMultiAlternatives(subject, message, from_email, [to_email], reply_to=reply_to)
|
||||
if html_message is not None:
|
||||
|
||||
Reference in New Issue
Block a user