email-manager
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseEmail Manager - 邮箱智能管家
Email Manager - Smart Email Assistant
当使用此技能
When to Use This Skill
- 管理多个邮箱账号(Gmail、QQ、Outlook 等)
- 定时查看邮件并生成摘要
- 智能生成回复草稿(需确认后发送)
- 重要邮件即时提醒
- Manage multiple email accounts (Gmail, QQ Mail, Outlook, etc.)
- Scheduled email checking and summary generation
- Intelligently generate reply drafts (requires confirmation before sending)
- Instant alerts for important emails
核心功能
Core Features
1. 多账号管理
1. Multi-account Management
- 支持任意 IMAP 邮箱
- 使用 安全存储凭据
pass - 配置文件:
config/accounts.json
- Supports any IMAP email service
- Uses for secure credential storage
pass - Configuration file:
config/accounts.json
2. 定时任务
2. Scheduled Tasks
- 每日 8:00 和 17:00 自动检查
- 通过 OpenClaw cron 调度
- 发现重要邮件即时通知
- Automatic checks at 8:00 and 17:00 daily
- Scheduled via OpenClaw cron
- Instant notifications when important emails are detected
3. 智能摘要
3. Intelligent Summary
- 使用 AI 提取邮件要点
- 按优先级分类
- 推送到 WhatsApp/Telegram
- Uses AI to extract key email points
- Classified by priority
- Pushed to WhatsApp/Telegram
4. 安全发送
4. Secure Sending
- AI 生成回复草稿
- 发送前展示预览
- 用户确认后才发送
- AI-generated reply drafts
- Preview displayed before sending
- Only sent after user confirmation
触发词
Trigger Phrases
- "查看邮件"
- "邮件摘要"
- "回复邮件"
- "添加邮箱账号"
- "邮件设置"
- "Check emails"
- "Email summary"
- "Reply to email"
- "Add email account"
- "Email settings"
配置步骤
Configuration Steps
1. 添加邮箱账号
1. Add Email Accounts
bash
undefinedbash
undefinedGmail(需先开启 IMAP 并生成应用专用密码)
Gmail (Enable IMAP and generate an app-specific password first)
pass insert email/gmail/your-email@gmail.com
pass insert email/gmail/your-email@gmail.com-app-pass
pass insert email/gmail/your-email@gmail.com
pass insert email/gmail/your-email@gmail.com-app-pass
QQ 邮箱(需先开启 IMAP 服务并获取授权码)
QQ Mail (Enable IMAP service and obtain an authorization code first)
pass insert email/qq/your-qq@qq.com
pass insert email/qq/your-qq@qq.com-auth-code
undefinedpass insert email/qq/your-qq@qq.com
pass insert email/qq/your-qq@qq.com-auth-code
undefined2. 更新账号配置
2. Update Account Configuration
编辑 :
config/accounts.jsonjson
{
"accounts": [
{
"name": "Gmail 主邮箱",
"email": "your-email@gmail.com",
"provider": "gmail",
"imap_server": "imap.gmail.com",
"imap_port": 993,
"smtp_server": "smtp.gmail.com",
"smtp_port": 587,
"enabled": true
},
{
"name": "QQ 邮箱",
"email": "your-qq@qq.com",
"provider": "qq",
"imap_server": "imap.qq.com",
"imap_port": 993,
"smtp_server": "smtp.qq.com",
"smtp_port": 587,
"enabled": true
}
]
}Edit :
config/accounts.jsonjson
{
"accounts": [
{
"name": "Main Gmail Account",
"email": "your-email@gmail.com",
"provider": "gmail",
"imap_server": "imap.gmail.com",
"imap_port": 993,
"smtp_server": "smtp.gmail.com",
"smtp_port": 587,
"enabled": true
},
{
"name": "QQ Mail Account",
"email": "your-qq@qq.com",
"provider": "qq",
"imap_server": "imap.qq.com",
"imap_port": 993,
"smtp_server": "smtp.qq.com",
"smtp_port": 587,
"enabled": true
}
]
}3. 设置定时任务
3. Set Up Scheduled Tasks
使用 OpenClaw cron:
bash
undefinedUsing OpenClaw cron:
bash
undefined8:00 检查邮件
Check emails at 8:00
openclaw cron add --name "早间邮件检查" --schedule "0 8 * * *" --script "~/clawd/skills/email-manager/scripts/check_email.py"
openclaw cron add --name "Morning Email Check" --schedule "0 8 * * *" --script "~/clawd/skills/email-manager/scripts/check_email.py"
17:00 检查邮件
Check emails at 17:00
openclaw cron add --name "晚间邮件检查" --schedule "0 17 * * *" --script "~/clawd/skills/email-manager/scripts/check_email.py"
undefinedopenclaw cron add --name "Evening Email Check" --schedule "0 17 * * *" --script "~/clawd/skills/email-manager/scripts/check_email.py"
undefined安全策略
Security Policy
| 操作 | 权限级别 |
|---|---|
| 读取邮件列表 | 🟢 自动 |
| 读取邮件内容 | 🟢 自动 |
| 生成摘要 | 🟢 自动 |
| 创建回复草稿 | 🟢 自动 |
| 发送邮件 | 🟡 需确认 |
| 删除邮件 | 🔴 禁止 |
| Operation | Permission Level |
|---|---|
| Read email list | 🟢 Automatic |
| Read email content | 🟢 Automatic |
| Generate summary | 🟢 Automatic |
| Create reply draft | 🟢 Automatic |
| Send email | 🟡 Requires Confirmation |
| Delete email | 🔴 Forbidden |
相关文件
Related Files
- - 邮件检查与摘要
scripts/check_email.py - - 发送邮件(需确认)
scripts/send_email.py - - 生成回复草稿
scripts/reply_draft.py - - 账号配置
config/accounts.json - - 邮件服务商配置
config/providers.json
- - Email checking and summary generation
scripts/check_email.py - - Send email (requires confirmation)
scripts/send_email.py - - Generate reply drafts
scripts/reply_draft.py - - Account configuration
config/accounts.json - - Email provider configuration
config/providers.json
常见邮箱 IMAP 配置
Common IMAP Configurations for Email Services
| 邮箱 | IMAP 服务器 | 端口 |
|---|---|---|
| Gmail | imap.gmail.com | 993 |
| QQ 邮箱 | imap.qq.com | 993 |
| Outlook | outlook.office365.com | 993 |
| 163 邮箱 | imap.163.com | 993 |
| 126 邮箱 | imap.126.com | 993 |
| Email Service | IMAP Server | Port |
|---|---|---|
| Gmail | imap.gmail.com | 993 |
| QQ Mail | imap.qq.com | 993 |
| Outlook | outlook.office365.com | 993 |
| 163 Mail | imap.163.com | 993 |
| 126 Mail | imap.126.com | 993 |
使用示例
Usage Examples
查看邮件摘要
View Email Summary
用户: 查看邮件
AI: [读取所有配置邮箱,生成摘要]
📧 今日邮件摘要 (2026-02-19 08:00)
Gmail 主邮箱 (3 封未读):
1. [重要] 项目进度更新 - 张三
2. 会议邀请:周五例会 - 李四
3. 订单发货通知 - 淘宝
QQ 邮箱 (1 封未读):
1. 验证码通知 - 某服务User: Check emails
AI: [Reads all configured emails and generates summary]
📧 Today's Email Summary (2026-02-19 08:00)
Main Gmail Account (3 unread):
1. [Important] Project Progress Update - Zhang San
2. Meeting Invitation: Weekly Friday Meeting - Li Si
3. Order Shipment Notification - Taobao
QQ Mail Account (1 unread):
1. Verification Code Notification - A Service回复邮件
Reply to Email
用户: 回复第1封邮件,告诉他项目进度正常
AI: [生成回复草稿]
📝 回复草稿:
收件人: 张三 <zhangsan@example.com>
主题: Re: 项目进度更新
内容:
---
张三,你好!
感谢你的关注。项目进度一切正常,目前按计划推进中。
如有其他问题,随时联系。
祝好,
Daniel
---
确认发送吗?(回复"确认"发送,"修改"调整,"取消"放弃)User: Reply to the first email, tell him the project is on track
AI: [Generates reply draft]
📝 Reply Draft:
Recipient: Zhang San <zhangsan@example.com>
Subject: Re: Project Progress Update
Content:
---
Hi Zhang San,
Thank you for your update. The project is progressing smoothly as planned.
Please feel free to contact me if you have any other questions.
Best regards,
Daniel
---
Confirm sending? (Reply "Confirm" to send, "Modify" to adjust, "Cancel" to abort)故障排查
Troubleshooting
SSL/连接问题
SSL/Connection Issues
- 症状: ,
Connection reset by peerSSL: UNEXPECTED_EOF_WHILE_READING - 根因: Mihomo/Clash TUN 模式劫持 IMAP 长连接不稳定
- 解决:
- Gmail 等海外邮箱:在 Mihomo 添加
Merge.yamlDOMAIN-SUFFIX,imap.gmail.com,DIRECT - QQ/163 等国内邮箱:需走国内代理出口,不可直连(海外 VPS)
- 代码已内置 ssl_context + 3次重试 + 2s退避
- Gmail 等海外邮箱:在 Mihomo
- Symptoms: ,
Connection reset by peerSSL: UNEXPECTED_EOF_WHILE_READING - Root Cause: Unstable IMAP long connections due to Mihomo/Clash TUN mode hijacking
- Solutions:
- Overseas email services like Gmail: Add to Mihomo
DOMAIN-SUFFIX,imap.gmail.com,DIRECTMerge.yaml - Domestic email services like QQ/163: Must use domestic proxy exit, direct connection not allowed (for overseas VPS)
- Code includes built-in ssl_context + 3 retries + 2s backoff
- Overseas email services like Gmail: Add
编码问题
Encoding Issues
- 症状:
LookupError: unknown encoding: unknown-8bit - 解决: 已添加 try/except 兜底用 utf-8 解码
_parse_email
- Symptoms:
LookupError: unknown encoding: unknown-8bit - Solution: has try/except fallback to decode with utf-8
_parse_email
超时问题
Timeout Issues
- 症状: 被 SIGKILL
check_email.py - 解决: 跳过 、limit 降到 10、使用
test_connectionheaders_only=True
创建日期: 2026-02-19
更新日期: 2026-02-24
版本: 1.1.0
- Symptoms: is killed by SIGKILL
check_email.py - Solutions: Skip , reduce limit to 10, use
test_connectionheaders_only=True
Created: 2026-02-19
Updated: 2026-02-24
Version: 1.1.0