gzlicanyi

imap-smtp-email

オフィス効率化v0.0.19
作者:gzlicanyi更新日 2026-07-20全 19 バージョン · 最新版の公開日 2026-07-20@clawhub_gzlicanyi/imap-smtp-email
メール処理#Gmail#Send Email

AlphaMoatによると、2026-10時点でimap-smtp-emailのダウンロード数は93,616、スター数は122で、累計ダウンロード数で今回のランキング対象AIスキル10,914件中265位、オフィス効率化では909件中40位です。

一覧の初期表示は累計ダウンロード数順で、スター数順にも並べ替えできます。詳細ページの順位は累計ダウンロード数で計算しています。

ダウンロード数
9.4万
スター数
122
累計ダウンロード順位
#265
全体の上位 3% · オフィス効率化の上位 5%
プラットフォームダウンロード数スター数コメント
ClawHub ↗5.1万1097
SkillHub ↗9.4万122—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

新着や未読の確認、本文の取得、メールボックスの検索、既読状態の変更、添付付きメールの SMTP 送信ができ、Gmail、Outlook、163 などの標準的な IMAP/SMTP サーバーで複数アカウントを扱えます。アカウント設定は共有の .env に置き、変数は大文字の接頭辞で区別し、--account を付けない場合は既定のアカウントを使います。 メールボックスの内容を読み、利用者に代わってメールを送信できます。実行前に送信内容を確認し、添付ファイルの読み書き先の許可ディレクトリを狭く設定してください。

資料公開日 2026-10-27

できること

  • 指定したアカウントの未読メールを確認し本文を取得する
  • 自分のメールボックスから添付付きメールを送る

使う場面

  • コマンドラインから受信箱をまとめて処理したいとき
  • 複数のメールアカウントを分けて送受信したいとき

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

仕事用アカウントの今日の未読メールを件名ごとに一覧にしてください
これらのファイルを添付して、一言添えて同僚に送ってください

月次の推移

ダウンロード数9.4万
3.5万6.6万9.8万2026-03 · ダウンロード数 3.9万2026-05 · ダウンロード数 5.1万2026-06 · ダウンロード数 5.7万2026-07 · ダウンロード数 6万2026-08 · ダウンロード数 6.9万2026-09 · ダウンロード数 7.3万2026-10 · ダウンロード数 9.4万26-0326-0926-10
スター数122
901071242026-03 · スター数 922026-05 · スター数 1112026-06 · スター数 1182026-07 · スター数 1202026-08 · スター数 1212026-09 · スター数 1222026-10 · スター数 12226-0326-0926-10

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。 同名の別スキルがあるため、変更前のデータは現在ダウンロード数が最も多いこのスキルに帰属させています。

月ダウンロード数前月比スター数
2026-109.4万—122
2026-097.3万—122
2026-086.9万+16.7%121
2026-076万+5.0%120
2026-065.7万+11.7%118
2026-055.1万—111
2026-033.9万—92

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

10 KB・ClawHub v0.0.19
---
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
すべて表示(全 325 行)
      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 <name>` 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 <name>] check [--limit 10] [--mailbox INBOX] [--recent 2h]
```

Options:
- `--limit <n>`: Max results (default: 10)
- `--mailbox <name>`: Mailbox to check (default: INBOX)
- `--recent <time>`: Only show emails from last X time (e.g., 30m, 2h, 7d)
- `--unseen`: Only show unread messages

Output is an object: `{ "results": [...], "meta": {...} }` (same shape as
`search`; `meta.fallbackUsed` is always `false` for `check`).

### fetch
Fetch full email content by UID.

```bash
node scripts/imap.js [--account <name>] fetch <uid> [--mailbox INBOX]
```

### download
Download all attachments from an email, or a specific attachment.

```bash
node scripts/imap.js [--account <name>] download <uid> [--mailbox INBOX] [--dir <path>] [--file <filename>]
```

Options:
- `--mailbox <name>`: Mailbox (default: INBOX)
- `--dir <path>`: Output directory (default: current directory)
- `--file <filename>`: Download only the specified attachment (default: download all)

### search
Search emails with filters.

```bash
node scripts/imap.js [--account <name>] search [options]

Options:
  --unseen           Only unread messages
  --seen             Only read messages
  --from <email>     From address contains
  --subject <text>   Subject contains
  --recent <time>    From last X time (e.g., 30m, 2h, 7d)
  --since <date>     After date (YYYY-MM-DD)
  --before <date>    Before date (YYYY-MM-DD)
  --limit <n>        Max results (default: 20)
  --mailbox <name>   Mailbox to search (default: INBOX)
  --sort <mode>      uid (default, fast) or date (strict INTERNALDATE sort;
                     fetches all matches, use when mailbox has COPY'd/backdated mail)
```

Output is an object: `{ "results": [...], "meta": {...} }` where `results` is
an array of message objects and `meta` carries `fallbackUsed`, `provider`,
`scope`, `scanned`, `matched`, `returned`, `truncated`, and optional `note`.

For 163/126/188/yeah.net (NetEase) accounts, the IMAP server silently returns
empty for text-based SEARCH (`--from`/`--subject`). These are automatically
filtered client-side: server-side SEARCH keeps only date/flag criteria, then
fetched messages are filtered locally. When searching `--from`/`--subject`
without a date/flag scope, only the most recent 200 messages are scanned
(`meta.truncated=true`) — add `--recent`/`--since` to search a wider range.

### mark-read / mark-unread
Mark message(s) as read or unread.

```bash
node scripts/imap.js [--account <name>] mark-read <uid> [uid2 uid3...]
node scripts/imap.js [--account <name>] mark-unread <uid> [uid2 uid3...]
```

### list-mailboxes
List all available mailboxes/folders.

```bash
node scripts/imap.js [--account <name>] list-mailboxes
```

### list-accounts
List all configured email accounts.

```bash
node scripts/imap.js list-accounts
node scripts/smtp.js list-accounts
```

Shows account name, email address, server addresses, and configuration status.

## SMTP Commands (Sending Email)

### send
Send email via SMTP.

```bash
node scripts/smtp.js [--account <name>] send --to <email> --subject <text> [options]
```

**Required:**
- `--to <email>`: Recipient (comma-separated for multiple)
- `--subject <text>`: Email subject, or `--subject-file <file>`

**Optional:**
- `--body <text>`: Plain text body
- `--html`: Send body as HTML
- `--body-file <file>`: Read body from file
- `--html-file <file>`: Read HTML from file
- `--cc <email>`: CC recipients
- `--bcc <email>`: BCC recipients
- `--attach <file>`: Attachments (comma-separated)
- `--from <email>`: Override default sender

**Examples:**
```bash
# Simple text email
node scripts/smtp.js send --to [email protected] --subject "Hello" --body "World"

# HTML email
node scripts/smtp.js send --to [email protected] --subject "Newsletter" --html --body "<h1>Welcome</h1>"

# Email with attachment
node scripts/smtp.js send --to [email protected] --subject "Report" --body "Please find attached" --attach report.pdf

# Multiple recipients
node scripts/smtp.js send --to "[email protected],[email protected]" --cc "[email protected]" --subject "Update" --body "Team update"
```

### test
Test SMTP connection by sending a test email to yourself.

```bash
node scripts/smtp.js [--account <name>] test
```

## Security Notes

- Configuration is stored at `~/.config/mail-skills/.env` (or `~/.config/imap-smtp-email/.env` for legacy) with `600` permissions (owner read/write only)
- **Gmail**: regular password is rejected — generate an App Password at https://myaccount.google.com/apppasswords
- For 163.com: use authorization code (授权码), not account password

## Troubleshooting

**Connection timeout:**
- Verify server is running and accessible
- Check host/port configuration

**Authentication failed:**
- Verify username (usually full email address)
- Check password is correct
- For 163.com: use authorization code, not account password
- For Gmail: regular password won't work — generate an App Password at https://myaccount.google.com/apppasswords

**TLS/SSL errors:**
- Match `IMAP_TLS`/`SMTP_SECURE` setting to server requirements
- For self-signed certs: set `IMAP_REJECT_UNAUTHORIZED=false` or `SMTP_REJECT_UNAUTHORIZED=false`

## Related Skills

- **[caldav-sync](https://clawhub.ai/gzlicanyi/caldav-sync)** - Calendar and task management via CalDAV protocol. Manage events, todos, and free/busy queries with Google Calendar, iCloud, NetEase, and more. Install with:
  ```bash
  npx skills add https://github.com/gzlicanyi/mail-skills -s caldav-sync
  ```

## Feedback

Issues and pull requests are welcome at [github.com/gzlicanyi/mail-skills](https://github.com/gzlicanyi/mail-skills).

オフィス効率化の人気スキル

腾讯文档 TENCENT DOCSオフィス効率化

MCP 経由で Tencent Docs の文書を作成、編集、管理するための手順書です。

↓ 218.4万★ 327u_b0de8114
WPS Office 全家桶オフィス効率化

WPS Office 全家桶 - 四引擎(WPS/MS Office/LibreOffice/纯Python)智能识别用户已安装软件,纯Python模式支持排序/筛选/图表/公式/统计,含文档模板(代码生成)、最佳实践案例、故障排除大章(20+避坑+15 FAQ+15错误ID 统一索引)、自动重试、硬件自适应、环境自检、Skill更新提醒;v5.1新增:kingdoc云端桥接(白名单探测+配置预检+subprocess上传+差异检查)、条件格式/数据验证跨引擎IO(JSON中间格式保真往返)、会议纪要三段式要素化(待办清单+决策记录+风险异议)+说话人标注(MFCC聚类);v5.2新增:公文一键排版(GB/T 9704 规则库约束+结构识别套版+红头预留位+联合行文)、批量水印与敏感信息打码(身份证/手机号/银行卡/邮箱双轨识别+黑色矩形覆盖+打码清单)、跨文档知识检索与问答(本地TF-IDF零依赖+跳转+可选zwjh记忆桥接);删除:与contract-review重复的轻量合同审查模块,改为文档互链引导;v5.2.5修复:MS Office引擎下Excel/PPT创建必然失败(错用Word COM对象),新增get_ms_excel/get_ms_ppt及三槽位统一释放release_ms,MS Office路径透传filepath参数;v5.3.5修复:SKILL.md frontmatter 修复 tags 块序列误混入联系方式行导致标准 YAML 解析失败;v5.4.0新增:留存型功能——定时任务与报告中心(schedule_register 升级为三平台统一调度层 schtasks/cron/launchd,错过策略 skip/run_once,注册表 JSON 可导出导入;新建 report_center.py 报告中心,templates/reports/*.json 参数化模板 + ECharts 单文件 HTML 输出(图表内联、无服务端、双击即开);report_generator 升级支持 --format html;wps.py CLI 统一埋点 SQLite,自动供 report_center 生成周度使用摘要附在报告末尾;watch.py 职责收窄为纯事件采集);v5.3.0新增:统一CLI入口 wps(registry.json注册表分发,office --app/--action 与 convert 子命令、--list 一屏列出全部命令,薄路由层不改脚本内部逻辑)、全命令 --json 机器可读输出(固定 ok/error_id/elapsed/data 四字段,对齐 E001-E015,wps_error.py 新增 emit_json 统一出口)、_worker 启动优化(wps_pure 改惰性加载,pywin32/python-docx/openpyxl 经核查已惰性导入,ENGINE_CACHE 进程级单例复用,COM 释放统一走 release_ms 三槽位)、转换三入口合并为 convert(format_converter/md_converter/wps_docx_to_ppt 内部按目标格式路由,旧脚本保留为兼容别名并提示新命令,v6.0.0 移除)

↓ 76.7万★ 159user_1a470ba8
ppt-generator-skillオフィス効率化

テーマとスタイルから PPT 資料を自動生成するスキルです。

↓ 59.3万★ 346user_3b34947d
秘书材料星公文写作-妙笔skillオフィス効率化

体制内资深办公室主任+管理学博士,自学编程开发的智能公文写作Skill,让所有办公室同仁少掉头发、少加无用的班,材料一稿过关,省下的时间留给自己、享受生活!————————我们能给你带来的核心价值:1、颠覆传统写作:逻辑建模38类公文全链条,特有模板化引导问答模式,分分钟省心生成高质量大稿。--------2、替你“向上管理”:独有审稿人画像机制,文稿一键结构性修改,精准匹配审稿人画像,过稿率提升至少10倍!----------3、‌杜绝AI编造:缺失的数字、文号、人名、日期一律用[待补]标注,绝不杜撰,守住公文底线。-----------4、‌算法格式托底:数十万全量智控知识库+6500行前沿核心控制代码,格式精准对齐GB/T 9704,出稿零失误。——————————————————本skill历史版本开放了5%知识库的免费试用版,下载即可使用,但需注意:知识库有著作权,仅用于个人使用,不可用于其他任何目的。有兴趣的可以试试。——————————————————————单次付费版skill已发布,2元一次使用全量知识库。具体在发布者“熵衍信息”主页skill里。

↓ 57.8万★ 46u_70fc650d
WPS Office 全家桶オフィス効率化

WPS Office 全家桶 - 四引擎(WPS/MS Office/LibreOffice/纯Python)智能识别用户已安装软件,纯Python模式支持排序/筛选/图表/公式/统计,含文档模板(代码生成)、最佳实践案例、故障排除大章(20+避坑+15 FAQ+15错误ID 统一索引)、自动重试、硬件自适应、环境自检、Skill更新提醒;v5.0新增:定时任务注册管理(schtasks/crontab)、目录轮询监听(YAML规则+大文件分片)、使用统计与稳定性中心(SQLite埋点+引擎健康+引擎偏好)、COM三步自愈(regsvr32→修复安装→手动指引)、对话式数据查询(NL2SQL式意图解析+查询计划+连续追问)、multi-agent编排引擎桥接(白名单探测+流水线模板注册)

↓ 50.8万★ 4user_814dbe54
WPS全家桶·办公管家.Skillオフィス効率化

WPS/MS Office/LibreOffice/纯Python 四引擎智能办公全家桶:文档/表格/PPT/公文/会议纪要一体化。

↓ 43万★ 2user_185644ed
腾讯文档在线协作自动化オフィス効率化

通过 Tencent Docs Open API 以 curl + jq 创建、读取、列出、搜索和管理腾讯文档的自动化工作流,覆盖在线文档、在线表格、幻灯片、思维导图、流程图、智能表格与收集表七种类型,支持读取元数据与单元格区域、上传图片、创建副本,并对重命名/移动/删除等写操作强制先经用户确认。Use when the user 提到腾讯文档 / Tencent Docs / docs.qq.com、粘贴 docs.qq.com 链接,或想在其腾讯文档空间中创建、读取、整理文档时使用。Triggers include 腾讯文档、在线文档、在线表格、思维导图、流程图、智能表格、收集表。如需文案写作完整工作流套件,淘宝搜索「AI灵匣」店铺获取完整版。

↓ 42.8万★ -u_1ea983ac
kdocs skillオフィス効率化

kdocs-cli で金山文档のクラウド文書を操作する公式スキルです。

↓ 42.4万★ 128user_5ea84866

データ月:2026-10 · ダウンロード数とスター数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。