You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(gmail): add --html flag for HTML email composition (#417)
Add --html flag to +send, +reply, +reply-all, and +forward, enabling
HTML email composition. When set, --body is treated as HTML content and
the Content-Type switches from text/plain to text/html.
For replies and forwards, the quoted/forwarded block matches Gmail web
UI fidelity: gmail_quote_container class, gmail_sendername structure,
mailto links in attribution and metadata, <div dir="ltr"> wrapper on
quoted content, and RFC 2822 dates reformatted to Gmail's human-friendly
style. When the original message has no HTML body, plain text is
HTML-escaped with <br> line breaks as a fallback (with a stderr
diagnostic).
- Includes the original message with sender, date, subject, and recipients.
51
+
- With `--html`, the forwarded block uses Gmail's `gmail_quote` CSS classes and preserves the original message's HTML formatting. Use HTML fragment tags (`<p>`, `<b>`, `<a>`, etc.) — no `<html>`/`<body>` wrapper needed.
52
+
- With `--html`, inline images embedded in the forwarded message (`cid:` references) will appear broken. Externally hosted images are unaffected.
- Replies to the sender and all original To/CC recipients.
51
-
- Use --to to add extra recipients to the To field.
52
-
- Use --cc to add new CC recipients.
53
-
- Use --bcc for recipients who should not be visible to others.
54
-
- Use --remove to exclude recipients from the outgoing reply, including the sender or Reply-To target.
55
-
- The command fails if no To recipient remains after exclusions and --to additions.
53
+
- Use `--to` to add extra recipients to the To field.
54
+
- Use `--cc` to add new CC recipients.
55
+
- Use `--bcc` for recipients who should not be visible to others.
56
+
- Use `--remove` to exclude recipients from the outgoing reply, including the sender or Reply-To target.
57
+
- The command fails if no To recipient remains after exclusions and `--to` additions.
58
+
- With `--html`, the quoted block uses Gmail's `gmail_quote` CSS classes and preserves the original message's HTML formatting. Use HTML fragment tags (`<p>`, `<b>`, `<a>`, etc.) — no `<html>`/`<body>` wrapper needed.
59
+
- With `--html`, inline images embedded in the quoted message (`cid:` references) will appear broken. Externally hosted images are unaffected.
- Automatically sets In-Reply-To, References, and threadId headers.
49
51
- Quotes the original message in the reply body.
50
-
- --to adds extra recipients to the To field.
51
-
- For reply-all, use +reply-all instead.
52
+
- With `--html`, the quoted block uses Gmail's `gmail_quote` CSS classes and preserves the original message's HTML formatting. Use HTML fragment tags (`<p>`, `<b>`, `<a>`, etc.) — no `<html>`/`<body>` wrapper needed.
53
+
- With `--html`, inline images embedded in the quoted message (`cid:` references) will appear broken. Externally hosted images are unaffected.
- Handles RFC 2822 formatting and base64 encoding automatically.
47
-
- For HTML bodies or attachments, use the raw API instead: gws gmail users messages send --json '...'
49
+
- With `--html`, the `--body` value should be HTML content, not a full document. Use tags like `<p>`, `<b>`, `<i>`, `<a href="...">`, `<br>`, `<ul>/<ol>/<li>`, `<table>`. No need for `<html>`/`<head>`/`<body>` wrappers.
50
+
- For attachments, use the raw API instead: gws gmail users messages send --json '...'
48
51
49
52
> [!CAUTION]
50
53
> This is a **write** command — confirm with the user before executing.
0 commit comments