gmail +forward
PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.
Forward a message to new recipients
Usage
CODEBLOCK0
Flags
| Flag | Required | Default | Description |
|---|
| INLINECODE2 | ✓ | — | Gmail message ID to forward |
| INLINECODE3 |
✓ | — | Recipient email address(es), comma-separated |
|
--from | — | — | Sender address (for send-as/alias; omit to use account default) |
|
--body | — | — | Optional note to include above the forwarded message (plain text, or HTML with --html) |
|
--no-original-attachments | — | — | Do not include file attachments from the original message (inline images in --html mode are preserved) |
|
--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
gmail +转发
前置条件: 请阅读 ../gws-shared/SKILL.md 了解认证、全局标志和安全规则。若该文件缺失,请运行 gws generate-skills 创建。
将邮件转发给新收件人
用法
bash
gws gmail +forward --message-id --to <邮箱地址>
标志
| 标志 | 必填 | 默认值 | 描述 |
|---|
| --message-id | ✓ | — | 要转发的 Gmail 邮件 ID |
| --to |
✓ | — | 收件人邮箱地址,多个地址用逗号分隔 |
| --from | — | — | 发件人地址(用于发送身份/别名;省略则使用账户默认地址) |
| --body | — | — | 在转发邮件上方添加的可选备注(纯文本,或使用 --html 的 HTML 格式) |
| --no-original-attachments | — | — | 不包含原始邮件中的文件附件(--html 模式下的内嵌图片会保留) |
| --attach | — | — | 附加文件(可多次指定) |
| --cc | — | — | 抄送邮箱地址,多个地址用逗号分隔 |
| --bcc | — | — | 密送邮箱地址,多个地址用逗号分隔 |
| --html | — | — | 将 --body 视为 HTML 内容(默认为纯文本) |
| --dry-run | — | — | 显示将要发送的请求但不实际执行 |
| --draft | — | — | 保存为草稿而非发送 |
示例
bash
gws gmail +forward --message-id 18f1a2b3c4d --to dave@example.com
gws gmail +forward --message-id 18f1a2b3c4d --to dave@example.com --body 供参考,见下文
gws gmail +forward --message-id 18f1a2b3c4d --to dave@example.com --cc eve@example.com
gws gmail +forward --message-id 18f1a2b3c4d --to dave@example.com --body
供参考
--html
gws gmail +forward --message-id 18f1a2b3c4d --to dave@example.com -a notes.pdf
gws gmail +forward --message-id 18f1a2b3c4d --to dave@example.com --no-original-attachments
gws gmail +forward --message-id 18f1a2b3c4d --to dave@example.com --draft
提示
- - 包含原始邮件的发件人、日期、主题和收件人信息。
- 默认包含原始附件(与 Gmail 网页版行为一致)。
- 使用 --html 时,内嵌图片通过 cid: 引用保留。
- 在纯文本模式下,不包含内嵌图片(与 Gmail 网页版一致)。
- 使用 --no-original-attachments 转发时不包含原始邮件的文件。
- 使用 -a/--attach 添加额外文件附件,可多次指定。
- 原始附件和用户附件总大小限制为 25MB。
- 使用 --html 时,转发块使用 Gmail 的 gmail_quote CSS 类并保留 HTML 格式。使用片段标签(
、、 等)——无需 / 包装。
- 使用 --draft 将转发保存为草稿而非立即发送。
另请参阅