Skip to content

fix(sending): preserve Bcc header in Sent mailbox copy#13180

Open
ChristophWurst wants to merge 2 commits into
mainfrom
fix/bcc-sent-copy
Open

fix(sending): preserve Bcc header in Sent mailbox copy#13180
ChristophWurst wants to merge 2 commits into
mainfrom
fix/bcc-sent-copy

Conversation

@ChristophWurst

@ChristophWurst ChristophWurst commented Jun 30, 2026

Copy link
Copy Markdown
Member

Fixes #11772.

Horde_Mime_Mail::addHeader('Bcc', ...) silos the Bcc value into a separate $_bcc field instead of $_headers, so getRaw() never includes it. The raw message stored in the Sent mailbox therefore had no Bcc header, unlike Evolution, Thunderbird, and Horde IMP.

Mirror Horde IMP's approach: build Horde_Mime_Headers directly with Bcc included, strip it from a clone for SMTP delivery (RFC 5321), and pass the full headers to $mimePart->toString() for the Sent mailbox copy.

Assisted-by: Claude:claude-sonnet-4-6

How to test

  1. Compose an email
  2. Enter a To recipient
  3. Enter a Bcc recipient
  4. Send
  5. Look at sent email source

main: no Bcc: header
here: Bcc header

If you look at the email source as To recipient you will still not see the Bcc header.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Horde_Mime_Mail::addHeader('Bcc', ...) silos the Bcc value into a
separate $_bcc field instead of $_headers, so getRaw() never includes
it. The raw message stored in the Sent mailbox therefore had no Bcc
header, unlike Evolution, Thunderbird, and Horde IMP.

Mirror Horde IMP's approach: build Horde_Mime_Headers directly with Bcc
included, strip it from a clone for SMTP delivery (RFC 5321), and pass
the full headers to $mimePart->toString() for the Sent mailbox copy.

Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
@ChristophWurst

Copy link
Copy Markdown
Member Author

/backport to stable5.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Persist BCC for sent emails

1 participant