邮件与消息32k · #9167
gws-gmail-forward
它能做什么
这个工具可以把你收到的一封邮件转发给其他人。你只需要告诉它要转发哪封邮件,以及发给谁。
适用场景
- ✓当你想把一封邮件分享给同事时。
- ✓当你需要把邮件发给更多人,又不想手动复制粘贴时。
- ✓当你想把邮件保存为草稿,以后再发送时。
技能链接
https://github.com/googleworkspace/cli/blob/main/skills/gws-gmail-forward/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/googleworkspace/cli/blob/main/skills/gws-gmail-forward/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add googleworkspace/cli --skill gws-gmail-forward
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/gws-gmail-forward/SKILL.md -o SKILL.md
可以这样问 AI
“把 ID 为 '123abc' 的邮件转发给 john@example.com 和 jane@example.com”
每周 5 个新技能,1 分钟读完。
工作原理
你需要提供要转发的邮件的唯一标识符,以及新收件人的邮箱地址。其余的事情工具会自动处理,包括保留原邮件的附件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
gmail +forward
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
Forward a message to new recipients
Usage
gws gmail +forward --message-id <ID> --to <EMAILS>
Flags
| Flag | Required | Default | Description |
|---|---|---|---|
--message-id |
✓ | — | Gmail message ID to forward |
--to |
✓ | — | 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
gws gmail +forward --message-id 18f1a2b3c4d --to dave@example.com
gws gmail +forward --message-id 18f1a2b3c4d --to dave@example.com --body 'FYI see below'
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 '<p>FYI</p>' --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
Tips
- Includes the original message with sender, date, subject, and recipients.
- Original attachments are included by default (matching Gmail web behavior).
- With --html, inline images are also preserved via cid: references.
- In plain-text mode, inline images are not included (matching Gmail web).
- Use --no-original-attachments to forward without the original message's files.
- Use -a/--attach to add extra file attachments. Can be specified multiple times.
- Combined size of original and user attachments is limited to 25MB.
- With --html, the forwarded block uses Gmail's gmail_quote CSS classes and preserves HTML formatting. Use fragment tags (<p>, <b>, <a>, etc.) — no <html>/<body> wrapper needed.
- Use --draft to save the forward as a draft instead of sending it immediately.
See Also
- gws-shared — Global flags and auth
- gws-gmail — All send, read, and manage email commands
常见问题
转发时,我可以同时附上自己的留言吗?
可以。你可以使用相应的命令添加一段简短的备注或 HTML 文本。
如果我不想带上原邮件的附件,该怎么办?
你可以使用排除原附件的选项。如果需要,仍然可以添加新的附件。
我可以设置抄送(CC)或密送(BCC)收件人吗?
可以。除了主要收件人,你还可以指定抄送和密送的收件人。
详情
热度
- GitHub 星标
- 32k
- 排名
- #9167
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/6
评论
- …