跳到主内容
智客 ZICQ

技能库 智客分类:协作效率 imap-smtp-email OpenClaw

Imap Smtp Email

通过IMAP/SMTP读取并发送电子邮件. 检查新/未读信件,获取内容,搜索信箱,标记为已读/未读,并发送带有附件的邮件. 支持多个账户。 与任何IMAP/SMTP服务器合作,包括Gmail,Outlook,163.com,vip.163.com,126.com,vip.126.com,188.com和vip.188.com.

1542 安装量 · 108 星标

官方网址:ClawHub

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

通过IMAP/SMTP读取并发送电子邮件. 检查新/未读信件,获取内容,搜索信箱,标记为已读/未读,并发送带有附件的邮件. 支持多个账户。 与任何IMAP/SMTP服务器合作,包括Gmail,Outlook,163.com,vip.163.com,126.com,vip.126.com,188.com和vip.188.com.

何时用

邮箱有 COPY'd/ backdated mail)

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:IMAP/SMTP Email Tool、Configuration、Config file format (shared)、Default account、File access whitelist (security)、Legacy config file format。

文件分析

文件分析:除 SKILL.md 外,正文引用了 scripts/imap.js、scripts/smtp.js,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Supports multiple accounts. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.

IMAP/SMTP Email ToolConfigurationConfig file format (shared)Default accountFile access whitelist (security)Legacy config file formatDefault account (no prefix)File access whitelist (security)Multi-AccountAdding an accountWork account (WORK_ prefix)Using a named account

来源分类:ClawHub Gmail

SKILL.md 与 Agent 调用

官方规范 ↗
name
imap-smtp-email
description
Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Supports multiple accounts. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 2
  • scripts/imap.js
  • scripts/smtp.js

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「imap-smtp-email」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-ce260a8c6adda587-Imap-Smtp-%E7%94%B5%E5%AD%90%E9%82%AE%E4%BB%B6.html
请存为 .cursor/skills/imap-smtp-email/SKILL.md 或 .claude/skills/imap-smtp-email/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://clawhub.ai/skills/imap-smtp-email 取完整目录,不要只建一个 SKILL.md。

当前没有明确的 GitHub 技能包地址,请按来源页面的安装器说明操作。

ClawHub ↗

阅读排版
--- name: imap-smtp-email description: Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Supports multiple accounts. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com. metadata: openclaw: emoji: "📧" requires: bins: - node - npm env: - PROVIDER - USERNAME - PASSWORD primaryEnv: PROVIDER --- # IMAP/SMTP Email Tool Read, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server. ## Configuration Run the setup script to install dependencies and configure your email account: ```bash bash setup.sh ``` If running commands manually without setup.sh, install dependencies first: ```bash npm install --production ``` Configuration is stored at `~/.config/mail-skills/.env` (shared with caldav-sync skill, survives skill updates). If no shared config is found, the skill checks `~/.config/imap-smtp-email/.env` (legacy) and then a `.env` file in the skill directory. ### Config file format (shared) ```bash # Default account PROVIDER=163 [email protected] PASSWORD=your_password # File access whitelist (security) ALLOWED_READ_DIRS=~/Downloads,~/Documents ALLOWED_WRITE_DIRS=~/Downloads ``` The `PROVIDER` preset auto-fills IMAP/SMTP server settings. For custom servers: ```bash PROVIDER=custom [email protected] PASSWORD=your_password IMAP_HOST=imap.example.com SMTP_HOST=smtp.example.com ``` ### Legacy config file format If you have an existing `~/.config/imap-smtp-email/.env`, it takes priority over the shared config. The format is: ```bash # Default account (no prefix) IMAP_HOST=imap.gmail.com IMAP_PORT=993 [email protected] IMAP_PASS=your_password IMAP_TLS=true IMAP_REJECT_UNAUTHORIZED=true IMAP_MAILBOX=INBOX SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_SECURE=false [email protected] SMTP_PASS=your_password [email protected] SMTP_REJECT_UNAUTHORIZED=true # File access whitelist (security) ALLOWED_READ_DIRS=~/Downloads,~/Documents ALLOWED_WRITE_DIRS=~/Downloads ``` Run `bash setup.sh` to migrate your legacy config to the shared format. ## Multi-Account You can configure additional email accounts in the same config file. Each account uses a name prefix (uppercase) on all variables. ### Adding an account Run the setup script and choose "Add a new account": ```bash bash setup.sh ``` Or manually add prefixed variables to `~/.config/mail-skills/.env`: ```bash # Work account (WORK_ prefix) WORK_PROVIDER=gmail [email protected] WORK_PASSWORD=app_password ``` ### Using a named account Add `--account ` before the command: ```bash node scripts/imap.js --account work check node scripts/smtp.js --account work send --to [email protected] --subject Hi --body Hello ``` Without `--account`, the default (unprefixed) account is used. ### Account name rules - Letters and digits only (e.g., `work`, `163`, `personal2`) - Case-insensitive: `work` and `WORK` refer to the same account - The prefix in `.env` is always uppercase (e.g., `WORK_PROVIDER`) - `ALLOWED_READ_DIRS` and `ALLOWED_WRITE_DIRS` are shared across all accounts (always unprefixed) ## Common Email Servers | Provider | IMAP Host | IMAP Port | SMTP Host | SMTP Port | |----------|-----------|-----------|-----------|-----------| | 163.com | imap.163.com | 993 | smtp.163.com | 465 | | vip.163.com | imap.vip.163.com | 993 | smtp.vip.163.com | 465 | | 126.com | imap.126.com | 993 | smtp.126.com | 465 | | vip.126.com | imap.vip.126.com | 993 | smtp.vip.126.com | 465 | | 188.com | imap.188.com | 993 | smtp.188.com | 465 | | vip.188.com | imap.vip.188.com | 993 | smtp.vip.188.com | 465 | | yeah.net | imap.yeah.net | 993 | smtp.yeah.net | 465 | | Gmail | imap.gmail.com | 993 | smtp.gmail.com | 587 | | Outlook | outlook.office365.com | 993 | smtp.office365.com | 587 | | QQ Mail | imap.qq.com | 993 | smtp.qq.com | 587 | | exmail.qq.com | imap.exmail.qq.com | 993 | smtp.exmail.qq.com | 465 | **Important for Gmail:** - Gmail does **not** accept your regular account password - You must generate an **App Password**: https://myaccount.google.com/apppasswords - Use the generated 16-character App Password as `IMAP_PASS` / `SMTP_PASS` - Requires Google Account with 2-Step Verification enabled **Important for 163.com:** - Use **authorization code** (授权码), not account password - Enable IMAP/SMTP in web settings first ## IMAP Commands (Receiving Email) ### check Check for new/unread emails. ```bash node scripts/imap.js [--account ] check [--limit 10] [--mailbox INBOX] [--recent 2h] ``` Options: - `--limit `: Max results (default: 10) - `--mailbox `: Mailbox to check (default: INBOX) - `--recent

相关技能

协作效率

Gog

Google 工作空间 CLI 用于 Gmail, Calendar, Drive, 联系人, 工作表和文档 .

协作效率

Notion

用于创建和管理页面、数据库和块的逗号 API.

协作效率

Slack

需要通过懒惰工具控制 Clawdbot 的 Slack 时使用,包括在 Slack 频道或 DMs 中对消息作出反应或发夹/取消项目.

协作效率

Agent Phone Call

代理电话 打给每个AI代理都有一个电话号码,并有能力通过电话完成事情——寻找联系人,打电话,完成任务. 告诉探员你需要什么 外出电话 代理电话 电话 保留 预订 来电 语音邮件 客户服务 接待员 代理电话 外出电话