PortEden - secured email (Gmail, Outlook, Exchange) access for OpenClaw
2026-03-29
新闻来源:网淘吧
围观:19
电脑广告
手机广告
porteden email
使用porteden email(别名:porteden mail)来管理多个账户的电子邮件。使用-jc标志以获得AI优化的输出。
如果porteden未安装:brew install porteden/tap/porteden(或go install github.com/porteden/cli/cmd/porteden@latest)。
设置(一次性)
- 浏览器登录(推荐):
porteden auth login— 将打开浏览器,凭据存储在系统钥匙串中 - 直接使用令牌:
porteden auth login --token <key>— 存储在系统钥匙串中 - 验证:
porteden 身份验证状态 - 如果
PE_API_KEY已在环境中设置,CLI 将自动使用它(无需登录)。
常用命令
- 列出邮件(或使用 --today、--yesterday、--week、--days N):
porteden email messages -jc - 筛选邮件:
porteden email messages --from sender@example.com -jc(还有:--to、--subject、--label、--unread、--has-attachment) - 搜索邮件:
porteden email messages -q "关键词" --today -jc - 自定义日期范围:
porteden email messages --after 2026-02-01 --before 2026-02-07 -jc - 所有邮件(自动分页):
porteden email messages --week --all -jc - 获取单封邮件:
porteden email message <邮件ID> -jc - 获取邮件线程:
porteden email thread <线程ID> -jc - 发送邮件:
porteden email send --to user@example.com --subject "Hi" --body "Hello"(其他选项:--cc、--bcc、--body-file、--body-type text、--importance high) - 使用带名称的收件人发送:
porteden email send --to "John Doe <john@example.com>" --subject "Hi" --body "Hello" - 回复:
porteden email reply <emailId> --body "Thanks"(添加--reply-all以回复所有人) - 转发:
porteden email forward <emailId> --to colleague@example.com(可选参数--body "FYI"、--cc) - 修改邮件:
porteden email modify <emailId> --mark-read(其他选项:--mark-unread、--add-labels IMPORTANT、--remove-labels INBOX) - 删除邮件:
porteden email delete <emailId>
备注
- 登录后凭证会保存在系统密钥环中,无需重复认证。
- 设置
PE_PROFILE=work以避免重复输入--profile参数。 -jc是--json --compact的简写:可移除附件详情、截断正文预览、限制标签数量、减少令牌占用。- 使用
--all参数可自动获取所有页面;需检查JSON输出中的hasMore与nextPageToken字段。 - 邮件ID包含服务商前缀(例如:
google:abc123、m365:xyz789),请按原样传递。 --include-body参数用于消息获取完整正文(默认:仅预览)。单个消息默认包含正文。--body和--body-file是互斥的。使用--body-type text用于纯文本(默认:html)。- 在发送、回复、转发或删除电子邮件之前进行确认。
- 环境变量:
PE_API_KEY、PE_PROFILE、PE_TIMEZONE、PE_FORMAT、PE_COLOR、PE_VERBOSE。
文章底部电脑广告
手机广告位-内容正文底部
上一篇:Triple Memory
下一篇:Tally


微信扫一扫,打赏作者吧~