gws-gmail-read
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesegmail +read
gmail +read
PREREQUISITE: Readfor auth, global flags, and security rules. If missing, run../gws-shared/SKILL.mdto create it.gws generate-skills
Read a message and extract its body or headers
前置要求: 阅读了解认证、全局标志和安全规则。如果缺少该文件,请运行../gws-shared/SKILL.md来创建它。gws generate-skills
读取邮件并提取正文或邮件头
Usage
使用方法
bash
gws gmail +read --id <ID>bash
gws gmail +read --id <ID>Flags
标志
| Flag | Required | Default | Description |
|---|---|---|---|
| ✓ | — | The Gmail message ID to read |
| — | — | Include headers (From, To, Subject, Date) in the output |
| — | text | Output format (text, json) |
| — | — | Return HTML body instead of plain text |
| — | — | Show the request that would be sent without executing it |
| 标志 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|
| ✓ | — | 要读取的Gmail邮件ID |
| — | — | 在输出中包含邮件头(发件人、收件人、主题、日期) |
| — | text | 输出格式(text、json) |
| — | — | 返回HTML格式正文而非纯文本 |
| — | — | 显示将要发送的请求但不实际执行 |
Examples
示例
bash
gws gmail +read --id 18f1a2b3c4d
gws gmail +read --id 18f1a2b3c4d --headers
gws gmail +read --id 18f1a2b3c4d --format json | jq '.body'bash
gws gmail +read --id 18f1a2b3c4d
gws gmail +read --id 18f1a2b3c4d --headers
gws gmail +read --id 18f1a2b3c4d --format json | jq '.body'Tips
提示
- Converts HTML-only messages to plain text automatically.
- Handles multipart/alternative and base64 decoding.
- 自动将仅HTML格式的邮件转换为纯文本。
- 支持处理multipart/alternative格式和base64解码。
See Also
另请参阅
- gws-shared — Global flags and auth
- gws-gmail — All send, read, and manage email commands
- gws-shared — 全局标志和认证
- gws-gmail — 所有发送、读取和管理邮件的命令