Skip to content

fix: remove flowed claim#1322

Open
resolvicomai wants to merge 1 commit into
floatpane:masterfrom
resolvicomai:fix/plaintext-format-flowed
Open

fix: remove flowed claim#1322
resolvicomai wants to merge 1 commit into
floatpane:masterfrom
resolvicomai:fix/plaintext-format-flowed

Conversation

@resolvicomai
Copy link
Copy Markdown
Contributor

What?

Fixes #1114. Plaintext-only messages now emit Content-Type: text/plain; charset=UTF-8 without format=flowed, and both plaintext MIME paths share the same header writer. A regression test covers that the header no longer advertises flowed text while keeping quoted-printable encoding.

Why?

The sender quoted-printable encodes the body but does not implement RFC 3676 format=flowed space-stuffing or soft line break semantics. Advertising format=flowed can make conforming clients reflow plain text incorrectly, especially quoted text.

Validation:

  • go test ./sender -run TestWritePlainTextPartHeadersDoesNotClaimFormatFlowed -count=1
  • go test ./sender -count=1
  • go test ./...
  • make lint
  • git diff --check

@resolvicomai resolvicomai requested a review from a team as a code owner May 21, 2026 08:50
@floatpanebot floatpanebot added area/sender SMTP send path bug Something isn't working size/S Diff: 11–50 lines labels May 21, 2026
FromSi
FromSi previously approved these changes May 21, 2026
Copy link
Copy Markdown
Member

@FromSi FromSi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@andrinoff
Copy link
Copy Markdown
Member

conflicts with your own PR @resolvicomai

@resolvicomai
Copy link
Copy Markdown
Contributor Author

Thanks for flagging it. I rebased this PR on current master after #1318 merged and resolved the conflict by keeping the writeQuotedPrintable helper from #1318 plus the plaintext header helper from this PR.

Validation after rebase:

  • go test ./sender
  • go test ./...
  • make lint
  • git diff --check origin/master...HEAD

The branch is pushed again as ac4938f.

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

Labels

area/sender SMTP send path bug Something isn't working size/S Diff: 11–50 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Plaintext part always asserts format=flowed without space-stuffing

4 participants