Rich compose: multipart/alternative send + reply/forward quoting #37

Closed
opened 2026-07-01 04:01:36 +00:00 by JMR-dev · 1 comment
JMR-dev commented 2026-07-01 04:01:36 +00:00 (Migrated from github.com)

Part of #14.

Context

Sending is plaintext-only today. To ship HTML mail correctly and interoperably, send
multipart/alternative with both an HTML and a plaintext part.

Scope

  • Build multipart/alternative (text/plain + text/html) in the send path (SMTP and the
    Microsoft Graph sender).
  • Generate a sensible text/plain fallback from the HTML body.
  • Update reply/forward quoting (data/ReplyBuilder.kt) to handle HTML originals and quote
    them without corruption.
  • Persist/restore the HTML body through drafts and the outbox.

Acceptance criteria

  • Sent messages contain both parts; HTML renders in common clients and the plaintext
    fallback is readable.
  • Replies quote HTML originals correctly.

Relevant files

  • mail/SmtpSender.kt, mail/GraphSender.kt, domain/model/OutgoingMessage.kt /
    OutboxMessage.kt, data/ReplyBuilder.kt, drafts storage

Dependencies

Depends on #36 (produces the HTML body).

Part of #14. ## Context Sending is plaintext-only today. To ship HTML mail correctly and interoperably, send `multipart/alternative` with both an HTML and a plaintext part. ## Scope - [ ] Build `multipart/alternative` (text/plain + text/html) in the send path (SMTP and the Microsoft Graph sender). - [ ] Generate a sensible text/plain fallback from the HTML body. - [ ] Update reply/forward quoting (`data/ReplyBuilder.kt`) to handle HTML originals and quote them without corruption. - [ ] Persist/restore the HTML body through drafts and the outbox. ## Acceptance criteria - Sent messages contain both parts; HTML renders in common clients and the plaintext fallback is readable. - Replies quote HTML originals correctly. ## Relevant files - `mail/SmtpSender.kt`, `mail/GraphSender.kt`, `domain/model/OutgoingMessage.kt` / `OutboxMessage.kt`, `data/ReplyBuilder.kt`, drafts storage ## Dependencies Depends on #36 (produces the HTML body).
JMR-dev commented 2026-07-03 01:47:46 +00:00 (Migrated from github.com)

Already delivered by #47 (commit bee5737, 'rich HTML editor, multipart send, and signatures'). The send path builds multipart/alternative (text/plain + text/html, nested in multipart/mixed with attachments — verified by the GreenMail-backed SmtpSenderTest), HtmlToText.kt generates the text/plain fallback, ReplyBuilder.kt handles HTML originals for reply/forward quoting, and OutgoingMessage.bodyHtml persists/restores through drafts + the outbox (ComposeViewModelTest confirms bodyHtml handling). Ticket was open only administratively; closing as completed.

Already delivered by #47 (commit bee5737, 'rich HTML editor, multipart send, and signatures'). The send path builds multipart/alternative (text/plain + text/html, nested in multipart/mixed with attachments — verified by the GreenMail-backed SmtpSenderTest), HtmlToText.kt generates the text/plain fallback, ReplyBuilder.kt handles HTML originals for reply/forward quoting, and OutgoingMessage.bodyHtml persists/restores through drafts + the outbox (ComposeViewModelTest confirms bodyHtml handling). Ticket was open only administratively; closing as completed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#37