Conversation
Outbound mail went out with a bare address, which renders nameless in clients and worsens spam-filter placement (Gmail to Outlook in particular). The From header now carries a display name resolved env-first (EMAIL_SENDER_NAME), then platforms.email.extra.sender_name, defaulting to Hermes; formataddr keeps non-ASCII names RFC 2047-safe. Both outbound paths use it: threaded replies and the standalone SMTP sender.
Competing with #105661 (same fix for #105657, same env/config precedence and |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements #105657.
Outbound email carried a bare address in
From:, so mail clients showed no sender name and Gmail→Outlook delivery suffered in spam filtering. The header now carries a configurable display name.Changes
plugins/platforms/email/adapter.py:EmailAdapter.__init__resolvesself._sender_nameenv-first:EMAIL_SENDER_NAME→platforms.email.extra.sender_name→ default"Hermes"_from_header()helper built onemail.utils.formataddr(RFC 2047 encoding for non-ASCII names)_new_reply()(threaded replies) and_standalone_send()(one-shot SMTP)tests/gateway/test_email_sender_name.py(new): default name, env override, extra-config fallback, RFC 2047 encoding of a non-ASCII name, reply header shapetests/gateway/test_email.py: the standalone-send test now expectsHermes <hermes@test.com>instead of the bare addressTests
Closes #105657