Skip to content
Agentmart
Submit a tool

imap-smtp-email-zh

通过 IMAP/SMTP 收发邮件。检查新邮件/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持多账号。兼容 Gmail、Outlook、163.com、vip.163.com、126.com、vip.126.com、188.com、vip.188.com 及任何标准 IMAP/SMTP 服务器。

Skill by L-LesterYu

IndexedMIT★ 57
Write a review

Chalk Labs

Need help deploying imap-smtp-email-zh?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/l-lesteryu-imap-smtp-email-zh

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

通过 IMAP/SMTP 收发邮件。检查新邮件/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持多账号。兼容 Gmail、Outlook、163.com、vip.163.com、126.com、vip.126.com、188.com、vip.188.com 及任何标准 IMAP/SMTP 服务器。

Use cases: productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Node.js package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/imap-smtp-email-zh

What's inside

Skill name
imap-smtp-email-zh
Description
通过 IMAP/SMTP 收发邮件。检查新邮件/未读邮件、获取内容、搜索邮箱、标记已读/未读、发送带附件的邮件。支持多账号。兼容 Gmail、Outlook、163.com、vip.163.com、126.com、vip.126.com、188.com、vip.188.com 及任何标准 IMAP/SMTP 服务器。
License
MIT
Instructions
264 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Instructions read files in your home folder (~/.ssh, ~/.aws…)

Files (8)

  • SKILL.md
  • _meta.json
  • package-lock.json
  • package.json
  • config.js · scripts/
  • imap.js · scripts/
  • smtp.js · scripts/
  • setup.sh

SKILL.md (first lines)

# IMAP/SMTP 邮件工具

通过 IMAP 协议读取、搜索和管理邮件。通过 SMTP 协议发送邮件。支持 Gmail、Outlook、163.com、vip.163.com、126.com、vip.126.com、188.com、vip.188.com 及任何标准 IMAP/SMTP 服务器。

## 配置

运行配置脚本设置邮箱账号:

```bash
bash setup.sh
```

配置文件存储在 `~/.config/imap-smtp-email/.env`(技能更新后不会被覆盖)。如果该路径未找到配置,将回退到技能目录下的 `.env` 文件(向后兼容)。

### 配置文件格式

```bash
# 默认账号(无前缀)
IMAP_HOST=imap.gmail.com
IMAP_PORT=993
IMAP_USER=your@email.com
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
SMTP_USER=your@email.com
SMTP_PASS=your_password
SMTP_FROM=your@email.com
SMTP_REJECT_UNAUTHORIZED=true

# 文件访问白名单(安全限制)
ALLOWED_READ_DIRS=~/Downloads,~/Documents
ALLOWED_WRITE_DIRS=~/Downloads
```

## 多账号

可以在同一配置文件中添加多个邮箱账号。每个账号使用名称前缀(大写)来区分所有变量。

### 添加账号

运行配置脚本并选择"添加新账号":

```bash
bash setup.sh
```

或手动在 `~/.config/imap-smtp-email/.env` 中添加带前缀的变量:

```bash
# 工作账号(WORK_ 前缀)
WORK_IMAP_HOST=imap.company.com
WORK_IMAP_PORT=993
WORK_IMAP_USER=me@company.com
WORK_IMAP_PASS=password
WORK_IMAP_TLS=true
WORK_IMAP_REJECT_UNAUTHORIZED=true
WORK_IMAP_MAILBOX=INBOX
WORK_SMTP_HOST=smtp.company.com
WORK_SMTP_PORT=587
WORK_SMTP_SECURE=false
WORK_SMTP_USER=me@company.com
WORK_SMTP_PASS=password
WORK_SMTP_FROM=me@company.com
WORK_SMTP_REJECT_UNAUTHORIZED=true
```

### 使用指定账号

在命令前添加 `--account <名称>`:

```bash
node scripts/imap.js --account work check
node scripts/smtp.js --account work send --to foo@bar.com --subject 你好 --body 你好世界
```

不指定 `--account` 时,使用默认(无前缀)账号。

### 账号命名规则

- 仅允许字母和数字(如 `work`、`163`、`personal2`)
- 大小写不敏感:`work` 和 `WORK` 指向同一账号
- `.env` 中的前缀始终为大写(如 `WORK_IMAP_HOST`)
- `ALLOWED_READ_DIRS` 和 `ALLOWED_WRITE_DIRS` 为所有账号共享(始终无前缀)

## 常用邮箱服务器

| 服务商 | IMAP 地址 | IMAP 端口 | SMTP 地址 | SMTP 端口 |
|--------|-----------|-----------|-----------|-----------|
| 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 邮箱 | imap.qq.com | 993 | smtp.qq.com | 587 |

**Gmail 注意事项:**
- Gmail **不接受**普通账号密码
- 必须生成**应用专用密码**:https://myaccount.google.com/apppasswords
- 将生成的 16 位应用专用密码作为 `IMAP_PASS` / `SMTP_PASS`
- 需要开启 Google 账号两步验证

**163.com 注意事项:**
- 使用**授权码**,而非账号密码
- 需先在网页设置中启用 IMAP/SMTP 服务

## IMAP 命令(收邮件)

### check
检查新邮件/未读邮件。

From L-LesterYu/OpenClaw-hot-skills-zh, MIT.

More from L-LesterYu/OpenClaw-hot-skills-zh

Signals

Stars
57
Forks
9
Open issues
0
Last commit (this folder)
Mar 25, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from L-LesterYu

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get imap-smtp-email-zh running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying imap-smtp-email-zh?

CallGet help
Cite this page

imap-smtp-email-zh skill. Agent Mart. https://agentmart.dev/skills/l-lesteryu-imap-smtp-email-zh (last updated 2026-10-24)