简介
基于 QQ 邮箱 SMTP/IMAP 协议的邮件收发自动化工具,支持邮件发送、收件箱管理、附件处理及 HTML 格式,需手动配置 16 位授权码。
原始描述
Send and receive emails via QQ Mail SMTP/IMAP. Use when: user wants to send/receive emails, check inbox, read messages, or share documents via email. Require...
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
中文使用说明 来自收录源
核心用法
QQ Email Skill 是一个基于 Python 标准库实现的 QQ 邮箱客户端工具,通过封装 SMTP/IMAP 协议提供完整的邮件收发能力。用户需在 TOOLS.md 中配置 QQ 邮箱地址、16 位授权码和发件人名称后,即可通过命令行或 Agent 调用实现邮件发送、收件箱查询、邮件阅读、附件下载等功能。
主要命令包括:
send:发送纯文本或 HTML 邮件,支持附件(最大 50MB)receive:列出最近邮件,支持指定数量和仅显示未读邮件read:根据 UID 读取特定邮件内容,可选保存附件mark-read:将指定邮件标记为已读
显著优点
-
零依赖设计:仅使用 Python 内置模块(smtplib、imaplib、email 等),无第三方包依赖,彻底规避供应链攻击风险。
-
协议标准可靠:采用官方 SMTP_SSL(465端口)和 IMAP_SSL(993端口),全程 SSL/TLS 加密传输,符合企业级安全标准。
-
功能完整实用:覆盖邮件收发的核心场景,支持 HTML 格式、多附件、未读筛选、批量处理等高频需求。
-
集成门槛低:通过环境变量或配置文件即可快速接入,适合集成到自动化工作流中。
潜在缺点与局限性
-
平台绑定:仅支持 QQ 邮箱,无法通用于 Gmail、Outlook 等其他邮件服务商。
-
凭证管理风险:授权码需以明文形式存储在 TOOLS.md 文件中,存在文件泄露导致邮箱被盗用的隐患。
-
附件安全不足:附件保存路径未做严格验证,存在路径遍历攻击的理论风险;缺乏附件类型白名单机制。
-
速率限制:免费账号每小时约 50 封邮件的发送限制,不适合大规模邮件营销场景。
-
错误信息暴露:部分错误处理会泄露系统路径等敏感信息。
适合的目标群体
- 需要自动化处理 QQ 邮件的个人用户(如定时发送报表、自动归档附件)
- 小型团队内部通知系统的搭建者
- 学习邮件协议原理的开发者或学生
- 对第三方依赖敏感、追求极简部署的技术用户
使用风险
- 凭证泄露风险:明文存储的授权码若被读取,可导致 QQ 邮箱完全失控,建议配合文件权限管控(600)使用。
- 网络依赖:需稳定连接 QQ 邮箱服务器,网络中断会导致操作失败。
- 数据外发:邮件内容需经腾讯服务器中转,敏感信息需评估合规性。
- 附件安全风险:下载附件时需警惕恶意文件,建议配合杀毒软件使用。
改进建议
建议后续版本集成系统密钥环(keyring)管理凭证、添加附件类型白名单和路径验证、完善操作日志审计功能,以进一步提升安全性。
技能正文
name: qq-email
description: "Send and receive emails via QQ Mail SMTP/IMAP. Use when: user wants to send/receive emails, check inbox, read messages, or share documents via email. Requires QQ email authorization code configured in TOOLS.md."
homepage: https://mail.qq.com
metadata: { "openclaw": { "emoji": "📧", "requires": { "bins": ["python3"], "files": ["/.openclaw/workspace/skills/qq-email/qq_email.py", "/.openclaw/workspace/TOOLS.md"] } } }
QQ Email Skill
Send and receive emails via QQ Mail SMTP/IMAP server.
When to Use
✅ USE this skill when:
- "Send an email to..."
- "Check my emails"
- "Read my unread emails"
- "Email this to [someone]"
- "Notify [person] via email"
- "Share this document via email"
- "What's in my inbox?"
When NOT to Use
❌ DON'T use this skill when:
- Sending SMS/WhatsApp → use messaging tools
- Internal notes → use memory files
- Public posts → use social media tools
Configuration Required
Before using, configure in TOOLS.md:
### QQ Email
- Email: your_qq_number@qq.com
- Auth Code: your_16_char_auth_code
- Sender Name: Your Name
Get QQ Auth Code:
- Login to mail.qq.com
- Settings → Account
- Enable POP3/SMTP service
- Generate authorization code (16 characters)
Commands
Send Email
python3 ~/.openclaw/workspace/skills/qq-email/qq_email.py send \
--to "recipient@example.com" \
--subject "Email Subject" \
--content "Email content here"
Receive/List Emails
# List 10 recent emails
python3 ~/.openclaw/workspace/skills/qq-email/qq_email.py receive
# List 20 emails
python3 ~/.openclaw/workspace/skills/qq-email/qq_email.py receive --count 20
# Unread emails only
python3 ~/.openclaw/workspace/skills/qq-email/qq_email.py receive --unread
Read Specific Email
# Read email by UID
python3 ~/.openclaw/workspace/skills/qq-email/qq_email.py read --uid 123
# Read and save attachments
python3 ~/.openclaw/workspace/skills/qq-email/qq_email.py read --uid 123 --save
Mark Email as Read
python3 ~/.openclaw/workspace/skills/qq-email/qq_email.py mark-read --uid 123
Send HTML Email
python3 ~/.openclaw/workspace/skills/qq-email/qq_email.py send \
--to "recipient@example.com" \
--subject "HTML Email" \
--content "<h1>Hello</h1><p>HTML content</p>" \
--html
Send with Attachment
python3 ~/.openclaw/workspace/skills/qq-email/qq_email.py send \
--to "recipient@example.com" \
--subject "Document Attached" \
--content "Please find attached." \
--attachment "/path/to/file.pdf"
Quick Responses
"Send an email to test@example.com"
→ Ask for subject and content, then:
python3 ~/.openclaw/workspace/skills/qq-email/qq_email.py --to "test@example.com" --subject "[subject]" --content "[content]"
"Email this file to someone"
→ Ask for recipient and add attachment:
python3 ~/.openclaw/workspace/skills/qq-email/qq_email.py --to "[email]" --subject "[subject]" --content "[content]" --attachment "[file]"
Notes
- Auth code ≠ QQ password (get from mail.qq.com settings)
- SMTP server: smtp.qq.com:465 (SSL)
- Rate limited: ~50 emails/hour for free accounts
- Attachments ≤ 50MB per email
- All sent emails saved in QQ Mail "Sent" folder
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。