mail-sender
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "mail-sender" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-581f8bea4f9355d1d5dbb812b091ea9dab839b41d379796b5e3fccc57cb88786. Verify the upstream source and version against https://skillhub.cn/skills/user_b22a52ba/mail-sender before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
One-click mail-sending skill. Used to quickly send emails.
Introduction source: third_party · user_b22a52ba · 2.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: mail-sender
description: 一键发送邮件技能。通过 "Skill + Python 脚本" 模式,基于 SMTP 协议发送邮件,支持附件、抄送、密送、直接发送或存入草稿箱。纯
Python 实现,无需安装任何 CLI 工具。当用户要求"发邮件"、"发送邮件"、"一键发邮件"、"写邮件并发送"、"发送附件"等意图时触发。
version: 2.0.0
tags:
- mail
- python
slug: mail-sender
displayName: Mail Sender
summary: 一键发送邮件技能Mail Sender 一键发送邮件技能
基于 "Skill + Python 脚本" 模式,通过 SMTP 协议实现邮件的自动发送。
架构
本技能由三个文件组成:
| 文件 | 用途 | 说明 |
|---|---|---|
SKILL.md |
技能描述 | 向 AI 描述能力与执行规则(本文件) |
config.json |
邮箱配置 | 存放邮箱账号、授权码等敏感信息,不进入大模型对话 |
scripts/send_mail.py |
执行脚本 | 实际执行邮件发送的 Python 脚本 |
邮箱配置(config.json)
配置信息不写入 SKILL.md,由用户在首次使用时填写。
config.json 位于 skill 根目录,格式如下:
{
"smtp_server": "smtp.qq.com",
"smtp_port": 465,
"sender_email": "your_email@qq.com",
"authorization_code": "your_smtp_auth_code"
}
常用邮箱 SMTP 配置:
| 邮箱 | SMTP 服务器 | SSL 端口 | 授权码获取方式 |
|---|---|---|---|
| QQ邮箱 | smtp.qq.com | 465 | 设置 → 账户 → 生成授权码 |
| 163邮箱 | smtp.163.com | 465 | 设置 → POP3/SMTP → 开启 → 获取授权码 |
| 126邮箱 | smtp.126.com | 465 | 同上 |
| Gmail | smtp.gmail.com | 465 | 应用专用密码 |
| Outlook | smtp.office365.com | 587 | 开启 SMTP 认证 |
安全说明:config.json 中的授权码只在脚本执行时使用,不会传入 AI 对话上下文。AI 只负责生成邮件内容和调用脚本,不会接触到邮箱密码。
执行脚本(scripts/send_mail.py)
脚本功能:
- 读取
config.json获取邮箱配置 - 读取用户指定的邮件内容(正文、主题、收件人)
- 支持纯文本和 HTML 两种格式
- 支持附件(相对路径或绝对路径)
- 支持抄送(CC)和密送(BCC)
- 支持"直接发送"和"存入草稿箱"两种模式
调用方式
python scripts/send_mail.py --to "recipient@example.com" --subject "邮件主题" --body "邮件正文"
完整参数
| 参数 | 必填 | 说明 |
|---|---|---|
--to |
是 | 收件人邮箱,多个用逗号分隔 |
--subject |
是 | 邮件主题 |
--body |
是 | 邮件正文(纯文本) |
--html |
否 | HTML 正文(如提供则优先于 --body 渲染) |
--cc |
否 | 抄送,多个用逗号分隔 |
--bcc |
否 | 密送,多个用逗号分隔 |
--attachment |
否 | 附件路径,支持多个(用逗号分隔)或单个 |
--mode |
否 | 发送模式:send(直接发送,默认)或 draft(存入草稿箱) |
--config |
否 | config.json 路径(默认自动查找) |
示例
# 直接发送纯文本邮件
python scripts/send_mail.py --to "client@example.com" --subject "拜访确认" --body "刘总您好,确认明天上午10点拜访..."
# 发送 HTML 邮件
python scripts/send_mail.py --to "client@example.com" --subject "会议纪要" --html "<h1>会议纪要</h1><p>...</p>"
# 发送带附件的邮件
python scripts/send_mail.py --to "client@example.com" --subject "方案资料" --body "详见附件" --attachment "./方案.pdf"
# 带抄送和密送
python scripts/send_mail.py --to "client@example.com" --cc "manager@company.com" --bcc "archive@company.com" --subject "周报" --body "本周工作..."
# 存入草稿箱(仅 QQ 邮箱等支持 IMAP 的邮箱)
python scripts/send_mail.py --to "test@example.com" --subject "草稿测试" --body "这是一封草稿" --mode draft
工作流程
标准流程(推荐)
用户下达指令 → AI 生成邮件正文 → AI 调用脚本发送 → 反馈结果给用户
三阶段确认流程(销售场景)
阶段1:AI 撰写邮件正文,展示给用户预览
阶段2:用户确认/微调内容
阶段3:用户确认后调用脚本发送
注意事项
- 隐私安全:AI 不能读取 config.json 中的授权码,只负责调用脚本。授权码只在脚本内使用。
- 附件路径:用户上传的附件会被保存到工作区,AI 需要将附件路径传递给脚本。
- HTML 邮件:建议同时提供纯文本和 HTML 版本,提高送达率。
- 发送限制:普通 QQ 邮箱每日约 50-100 封,超出可能被限制。
- 草稿箱模式:依赖 IMAP 协议,部分邮箱可能不支持。
- 编码:所有中文内容使用 UTF-8 编码。
Current listing version
2.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 邮件发送是明确的高频刚需场景,直接解决用户核心任务痛点
- 支持多种邮箱服务商、附件、抄送、密送等完整功能闭环
- 提供标准流程和三阶段确认流程,满足不同场景需求
Highlights
- 触发词覆盖完整且精准(发邮件、发送邮件、一键发邮件等)
- 边界清晰,不易与其他 Skill 重叠
Highlights
- Phase/步骤清晰,有完整的工作流程说明
- 提供丰富的端到端示例,涵盖各种使用场景
- frontmatter完整,文档结构规范
Highlights
- 工具来源明确(Python SMTP 协议),参数定义完整
- 覆盖主要异常场景(编码、发送限制、草稿箱兼容性)
- 提供隐私安全说明和确认流程建议
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.