gmail +reply
PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.
Reply to a message (handles threading automatically)
Usage
CODEBLOCK0
Flags
| Flag | Required | Default | Description |
|---|
| INLINECODE2 | ✓ | — | Gmail message ID to reply to |
| INLINECODE3 |
✓ | — | Reply body (plain text, or HTML with --html) |
|
--from | — | — | Sender address (for send-as/alias; omit to use account default) |
|
--to | — | — | Additional To email address(es), comma-separated |
|
--attach | — | — | Attach a file (can be specified multiple times) |
|
--cc | — | — | CC email address(es), comma-separated |
|
--bcc | — | — | BCC email address(es), comma-separated |
|
--html | — | — | Treat --body as HTML content (default is plain text) |
|
--dry-run | — | — | Show the request that would be sent without executing it |
|
--draft | — | — | Save as draft instead of sending |
Examples
CODEBLOCK1
Tips
See Also
技能名称: gws-gmail-reply
详细描述:
gmail +reply
前置条件: 阅读 ../gws-shared/SKILL.md 了解认证、全局标志和安全规则。如果该文件缺失,请运行 gws generate-skills 创建。
回复邮件(自动处理线程)
用法
bash
gws gmail +reply --message-id --body <文本>
标志
| 标志 | 必需 | 默认值 | 描述 |
|---|
| --message-id | ✓ | — | 要回复的 Gmail 邮件 ID |
| --body |
✓ | — | 回复正文(纯文本,或使用 --html 时支持 HTML) |
| --from | — | — | 发件人地址(用于发送身份/别名;省略则使用账户默认地址) |
| --to | — | — | 额外的收件人邮箱地址,逗号分隔 |
| --attach | — | — | 附加文件(可多次指定) |
| --cc | — | — | 抄送邮箱地址,逗号分隔 |
| --bcc | — | — | 密送邮箱地址,逗号分隔 |
| --html | — | — | 将 --body 视为 HTML 内容(默认为纯文本) |
| --dry-run | — | — | 显示将要发送的请求但不执行 |
| --draft | — | — | 保存为草稿而非发送 |
示例
bash
gws gmail +reply --message-id 18f1a2b3c4d --body 谢谢,已收到!
gws gmail +reply --message-id 18f1a2b3c4d --body 抄送 Carol --cc carol@example.com
gws gmail +reply --message-id 18f1a2b3c4d --body 添加 Dave --to dave@example.com
gws gmail +reply --message-id 18f1a2b3c4d --body 加粗回复 --html
gws gmail +reply --message-id 18f1a2b3c4d --body 更新版本 -a updated.docx
gws gmail +reply --message-id 18f1a2b3c4d --body 草稿回复 --draft
提示
- - 自动设置 In-Reply-To、References 和 threadId 标头。
- 在回复正文中引用原始邮件。
- --to 可将额外收件人添加到收件人字段。
- 使用 -a/--attach 添加文件附件。可多次指定。
- 使用 --html 时,引用块会使用 Gmail 的 gmail_quote CSS 类并保留 HTML 格式。请使用片段标签(如
、、 等)——无需 / 包装。
- 使用 --html 时,引用邮件中的内嵌图片通过 cid: 引用保留。
- 使用 --draft 可将回复保存为草稿而非立即发送。
- 如需回复全部,请改用 +reply-all。
另请参阅