Repository navigation
Conversation
…tive With --html the text (argument or stdin) is HTML. The plain-text part is made from it with cli-core's htmlToText, and nodemailer builds a multipart/alternative message. Draft gains an optional html field that build passes through. The answer reports html_chars. A reply with --html is refused: a reply quotes its original as plain text, and an HTML part without that quote would differ from the plain part. This is the mail-cli step of the digest format plan, so the email route can deliver an HTML digest instead of raw Markdown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What
mail <profile> messages send --htmlreads the text (argument or stdin) as HTML.htmlToText. The mail goes asmultipart/alternative, and asmultipart/mixedaround that when files are attached.Draftgains an optionalhtmlfield, andbuildpasses it to nodemailer. The answer addshtml_chars.--htmltogether with--reply-tois refused (validation_error). A reply quotes its original as plain text, so an HTML part would not have the quote.Why
This is the mail-cli step of the digest format plan (
max-cli/docs_ai/plans/2026-11-07-digest-format.md, section 7 step 3). Today the email route sends the morning digest as raw Markdown, becausemessages sendcan only send plain text. With this flag, the cli-core renderer (and memo--deliver-to) can send HTML.Not in this PR
--text-file <file>for a hand-written plain part. The plan mentions it as an option. It is not needed until a renderer makes its own plain text.How tested
src/send.test.ts: sends synthetic HTML through the fake SMTP server and checksmultipart/alternative, the decoded plain part and the HTML part. It also checks that--htmlwith--reply-tois refused and nothing is sent.pnpm vitest run --maxWorkers=1: 26 files, 335 tests pass.pnpm typecheck,pnpm lint(no new warnings),pnpm docs:check,pnpm contracts:checkandpnpm test:matrix:checkall pass.docs/commands.mdanddocs/dev/test-matrix.mdwere regenerated.🤖 Generated with Claude Code