Set To header to undisclosed-recipients when using BCC#521
Draft
alexander-akhmetov wants to merge 1 commit intomainfrom
Draft
Set To header to undisclosed-recipients when using BCC#521alexander-akhmetov wants to merge 1 commit intomainfrom
alexander-akhmetov wants to merge 1 commit intomainfrom
Conversation
When UseBCC is enabled, the To header was left empty, which looks odd to recipients and may cause some mail servers to flag the message as spam. Set it to "undisclosed-recipients:;" per RFC 2822.
Contributor
Author
|
bugbot review |
Collaborator
|
If I may to chip-in, the PR looks good for a try. I would just evaluate having, or not a FT to rollback quick in case of unexpected issues. |
Contributor
Author
|
The tests break because |
titolins
approved these changes
Mar 26, 2026
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.
When UseBCC is enabled, the To header was left empty, which looks odd to recipients and may cause some mail servers to flag the message as spam. Set it to
undisclosed-recipients:;per RFC 2822.Note
Low Risk
Low risk: small header change limited to the
UseBCC && !SingleEmailpath, with tests updated to lock in the newTo/Bccbehavior.Overview
When
EmailSenderConfig.UseBCCis enabled (andSingleEmailis false), outgoing emails now set theToheader toundisclosed-recipients:;while placing actual recipients inBcc, instead of leavingToempty.Tests in
email_sender_test.gowere updated to expect the newToheader value in this scenario.Written by Cursor Bugbot for commit 4da7d68. This will update automatically on new commits. Configure here.