-
Notifications
You must be signed in to change notification settings - Fork 1.4k
gmail +send --html should emit multipart/alternative (parity with +reply-all) #793
Open
Description
Summary
gws gmail +send --html currently produces a single-part text/html message, while gws gmail +reply-all --html produces multipart/alternative (HTML + a plain-text alternative). Behavior parity across the helpers would be useful.
Current behavior
$ gws gmail +send --to me@example.com --subject test --html --body '<p>hi</p>'
$ gws gmail users messages get --params '{"userId":"me","id":"<id>","format":"metadata"}' \
| jq .payload.mimeType
"text/html"
$ gws gmail +reply-all --message-id <msg> --html --body '<p>hi</p>'
$ gws gmail users messages get --params '{"userId":"me","id":"<id>","format":"metadata"}' \
| jq .payload.mimeType
"multipart/alternative"
Desired behavior
+send --html (and +forward --html if applicable) emits multipart/alternative with two parts:
text/plain: strip-tags fallback of the HTML bodytext/html: the user-supplied HTML body
Why it matters
- Some corporate spam gateways slightly down-weight
text/html-only mail vs. multipart. - Text-only clients and accessibility tools have no fallback content.
- Helper-to-helper consistency:
+reply-allalready does this;+sendshould too.
Implementation note
The compiled binary already references multipart/alternative, and +reply-all's codepath produces it, so the MIME composer supports it. Looks like a small wiring change in the +send helper to plumb the alternative-part construction.
Version
gws 0.22.5 (macOS x86_64).
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.