mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
email: Attempt to suppress email auto-replies.
This applies a commonly-used, though non-RFC, header which suppresses auto-replies to the message. There is a small chance that this will result in bad filters thinking the messages *from Zulip* are themselves auto-replies, but this seems a small risk. Fixes: #13193.
This commit is contained in:
committed by
Tim Abbott
parent
1ea3f83c1e
commit
134977b590
@@ -101,7 +101,11 @@ def build_email(
|
||||
stringified = str(Address(addr_spec=to_user.delivery_email))
|
||||
to_emails.append(stringified)
|
||||
|
||||
extra_headers = {}
|
||||
# Attempt to suppress all auto-replies. This header originally
|
||||
# came out of Microsoft Outlook and friends, but seems reasonably
|
||||
# commonly-recognized.
|
||||
extra_headers = {"X-Auto-Response-Suppress": "All"}
|
||||
|
||||
if realm is not None:
|
||||
# formaddr is meant for formatting (display_name, email_address) pair for headers like "To",
|
||||
# but we can use its utility for formatting the List-Id header, as it follows the same format,
|
||||
|
||||
Reference in New Issue
Block a user