gws-gmail-read

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

gmail +read

gmail +read

PREREQUISITE: Read
../gws-shared/SKILL.md
for auth, global flags, and security rules. If missing, run
gws generate-skills
to create it.
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

标志

FlagRequiredDefaultDescription
--id
The Gmail message ID to read
--headers
Include headers (From, To, Subject, Date) in the output
--format
textOutput format (text, json)
--html
Return HTML body instead of plain text
--dry-run
Show the request that would be sent without executing it
标志是否必填默认值说明
--id
要读取的Gmail邮件ID
--headers
在输出中包含邮件头(发件人、收件人、主题、日期)
--format
text输出格式(text、json)
--html
返回HTML格式正文而非纯文本
--dry-run
显示将要发送的请求但不实际执行

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 — 所有发送、读取和管理邮件的命令