← 返回 Skills 市场
wazixuan

Email IMAP/SMTP

作者 WaziXuan · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ✓ 安全检测通过
284
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install email-imap-smtp
功能描述
Connect to mainstream email providers and perform reliable send/receive workflows through IMAP and SMTP with password or OAuth2 authentication. Use when a us...
使用说明 (SKILL.md)

Email IMAP/SMTP

Use this skill to automate email operations with standard IMAP/SMTP protocols using local scripts.

Workflow

  1. Confirm provider and auth mode (password or oauth2).
  2. Run connection checks first.
  3. List/search emails before reading full content.
  4. Send email only after previewing key fields (to/subject/body/attachments).

Security Rules

  • Prefer app passwords over account login passwords in password mode.
  • Prefer OAuth2 tokens for Gmail, Outlook, Yahoo, AOL, and Zoho.
  • Do not print secrets in terminal output.
  • Load credentials from environment variables whenever possible.
  • Avoid storing real credentials in repository files.

Required Inputs

  • Email address (login username)
  • Authentication:
    • Password mode: app password / authorization code
    • OAuth2 mode: access token, or refresh token + client info
  • IMAP host/port
  • SMTP host/port

Use references/provider-presets.md for common provider host/port defaults.

Script

Run:

python scripts/email_ops.py --help

Subcommands:

  • check: Verify IMAP/SMTP login connectivity.
  • list: List recent/unread email summaries.
  • read: Read one email by UID.
  • send: Send an email with optional HTML and attachments.
  • token: Resolve OAuth2 access token (masked output by default).
  • auth-url: Build OAuth2 browser login URL for authorization code flow.

Common Commands

Check mailbox connectivity:

python scripts/email_ops.py check --provider qq --email [email protected]

Check connectivity with OAuth2 (Gmail):

python scripts/email_ops.py check --provider gmail --email [email protected] --auth-mode oauth2 --access-token "\x3CACCESS_TOKEN>"

List unread emails:

python scripts/email_ops.py list --provider qq --email [email protected] --unseen --limit 20

Read one email:

python scripts/email_ops.py read --provider qq --email [email protected] --uid 12345

Send email:

python scripts/email_ops.py send --provider qq --email [email protected] --to [email protected] --subject "Test" --body "Hello from Codex"

Resolve a new OAuth2 token from refresh token:

python scripts/email_ops.py token --provider outlook --email [email protected] --auth-mode oauth2 --refresh-token "\x3CREFRESH_TOKEN>" --client-id "\x3CCLIENT_ID>" --client-secret "\x3CCLIENT_SECRET>"

Build OAuth2 authorization URL (Gmail example):

python scripts/email_ops.py --provider gmail --client-id "\x3CCLIENT_ID>" --redirect-uri "http://localhost:8080/callback" auth-url

Environment Variables

  • EMAIL_ADDRESS: Login email address.
  • EMAIL_PROVIDER: Provider preset key (for example qq, gmail, outlook, yahoo, aol, zoho, icloud).
  • EMAIL_AUTH_MODE: auto/password/oauth2.
  • EMAIL_APP_PASSWORD or EMAIL_PASSWORD: Password mode credential.
  • EMAIL_ACCESS_TOKEN: OAuth2 access token.
  • EMAIL_REFRESH_TOKEN: OAuth2 refresh token.
  • EMAIL_TOKEN_ENDPOINT: OAuth2 token endpoint.
  • EMAIL_AUTH_ENDPOINT: OAuth2 authorization endpoint.
  • EMAIL_CLIENT_ID: OAuth2 client id.
  • EMAIL_CLIENT_SECRET: OAuth2 client secret.
  • EMAIL_REDIRECT_URI: OAuth2 redirect URI for auth-url.
  • EMAIL_SCOPE: Optional scope for refresh request.
  • EMAIL_IMAP_HOST, EMAIL_IMAP_PORT: Override IMAP endpoint.
  • EMAIL_SMTP_HOST, EMAIL_SMTP_PORT: Override SMTP endpoint.
  • EMAIL_SMTP_SSL: true/false, default from provider preset.

Troubleshooting

  • Authentication failed in password mode: confirm app password and IMAP/SMTP permissions are enabled.
  • Authentication failed in OAuth2 mode: confirm token has IMAP/SMTP scopes and token endpoint/client info are correct.
  • SSL/TLS handshake failed: verify host/port pair and whether SMTP SSL is enabled.
  • Empty list results: switch mailbox folder (--mailbox) or remove filters.
安全使用建议
This skill appears to be what it claims: a local Python tool for IMAP/SMTP with support for password or OAuth2. Before installing or running it: (1) review scripts/email_ops.py yourself (it will talk to mail servers and OAuth token endpoints); (2) provide only least-privilege credentials — prefer app passwords or an OAuth client with minimal scopes and a refresh token you can revoke; (3) do not paste production account passwords or long-lived secrets into public repos; (4) run in an environment you control (or use throwaway/test accounts) if you are unsure; and (5) note the registry metadata omission — the SKILL.md reads many EMAIL_* env vars, so expect to supply those when using the skill.
功能分析
Type: OpenClaw Skill Name: email-imap-smtp Version: 0.1.0 The skill bundle provides a standard implementation for IMAP/SMTP email operations, including support for OAuth2 and common provider presets. The core logic in `scripts/email_ops.py` uses Python's standard libraries (imaplib, smtplib, urllib) to handle authentication and message processing, following security best practices such as masking tokens by default and preferring environment variables for secrets. No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
Purpose & Capability
The name/description (IMAP/SMTP mailbox access) matches the included script and SKILL.md which require IMAP/SMTP host info and either password or OAuth2 credentials. One inconsistency: registry metadata lists no required env vars or primary credential, while SKILL.md and the script explicitly read many EMAIL_* environment variables (credentials and endpoints). This is likely an omission in registry metadata but worth noting.
Instruction Scope
SKILL.md confines actions to mailbox operations (connect, list/search/read/send, build auth URL, refresh token). It explicitly tells the agent to load credentials from env vars and avoid printing secrets. There are no instructions to read unrelated system files, other skills' configs, or to send data to arbitrary external hosts beyond standard OAuth/token endpoints and mail servers.
Install Mechanism
No install spec (instruction-only), and the included Python script runs locally. No downloads or external installers are involved, so installation risk is low. The presence of a code file is expected for this kind of skill.
Credentials
The skill requests many sensitive environment variables (email address, app password or client secret/refresh token/access token). Those are proportionate to performing IMAP/SMTP and OAuth flows. However, the registry metadata does not declare these env vars, creating a transparency gap the user should be aware of.
Persistence & Privilege
The skill is not forced-always and does not request system-wide config changes. It does not claim or appear to modify other skills or system-wide agent settings. Autonomous invocation is allowed (platform default) but not combined with other concerning privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install email-imap-smtp
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /email-imap-smtp 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release: IMAP/SMTP email ops with password and OAuth2, plus auth-url support.
元数据
Slug email-imap-smtp
版本 0.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Email IMAP/SMTP 是什么?

Connect to mainstream email providers and perform reliable send/receive workflows through IMAP and SMTP with password or OAuth2 authentication. Use when a us... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 284 次。

如何安装 Email IMAP/SMTP?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install email-imap-smtp」即可一键安装,无需额外配置。

Email IMAP/SMTP 是免费的吗?

是的,Email IMAP/SMTP 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Email IMAP/SMTP 支持哪些平台?

Email IMAP/SMTP 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Email IMAP/SMTP?

由 WaziXuan(@wazixuan)开发并维护,当前版本 v0.1.0。

💬 留言讨论