# Email Usage

> Sends and reads email for your own domain through a local mail server using fixed scripts, and creates new mail accounts.

- Skill: `luokai0/email-usage` (Agent Skill, multi-file: 6 files)
- Install (CLI): `npx skillmds@latest add luokai0/email-usage`
- Raw SKILL.md: https://api.skillmd.com/api/skills/luokai0/email-usage/raw
- Safety review: CAUTION (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity, AI & ML, Integrations & APIs, Email & Calendar
- Tags: Email, Imap, Mail Server, Python, Smtp
- Author: luokai0 (https://skillmd.com/u/luokai0)
- Updated: 2026-08-22
- Page: https://skillmd.com/skills/luokai0/email-usage

---


# Email 使用

## SMTP 发送（需要认证）

```bash
python3 skills/email-usage/scripts/send_email.py <收件人> <主题> <正文> <发件邮箱> <密码>
```

**参数**：收件人、主题、正文、发件邮箱、密码（向 小爪子 查询）

**示例**：
```bash
python3 skills/email-usage/scripts/send_email.py \
  'someone@example.com' '邮件标题' '邮件正文' \
  'test@axelhu.com' 'test1234'
```

## IMAP 读取

```bash
python3 skills/email-usage/scripts/read_email.py <用户名> <密码> [最新N封，默认5]
```

**示例**：
```bash
python3 skills/email-usage/scripts/read_email.py 'test@axelhu.com' 'test1234' 3
```

## 新增邮箱账号

```bash
python3 skills/email-usage/scripts/create_email.py <邮箱> <密码>
```

**示例**：
```bash
python3 skills/email-usage/scripts/create_email.py newuser@axelhu.com securepass
```

账号创建后，发件和收件使用同一套密码。

## 规则

- **不要**配置 SMTP/Postfix/amavis
- **不要**操作邮件队列（postqueue/postsuper）
- **不要**修改容器内配置
- 连接超时或发送失败 → 联系 小爪子
- 密码遗忘 → 联系 小爪子

