원클릭으로
send-email
邮件发送工具。配置 SMTP 发件人后,通过脚本发送纯文本或 HTML 邮件,支持附件、抄送、密送。在需要发送邮件通知、报告、自动化邮件时触发。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
邮件发送工具。配置 SMTP 发件人后,通过脚本发送纯文本或 HTML 邮件,支持附件、抄送、密送。在需要发送邮件通知、报告、自动化邮件时触发。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
A curated collection of 2409+ best OpenClaw skills — AI tools, productivity, marketing, frontend, mobile, backend, DevOps and more. Weekly updated by MyClaw.ai — Powered by MyClaw.ai
将1688的商品铺货到俄罗斯电商平台Ozon(上架),通过Ozon官方API实现商品信息的上传和状态查询。适用于需要将单个1688的商品上架到Ozon的场景。
ActiveCampaign API integration with managed OAuth. Marketing automation, CRM, contacts, deals, and email campaigns. Use this skill when users want to manage contacts, deals, tags, lists, automations, or campaigns in ActiveCampaign. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
Acuity Scheduling API integration with managed OAuth. Manage appointments, calendars, clients, and availability. Use this skill when users want to schedule, reschedule, or cancel appointments, check availability, or manage clients and calendars. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway).
World-Class Adaptability & Learning Playbook. Use for: market trend awareness, horizon scanning, PESTLE analysis, organisational agility, Kaizen, PDCA cycles, 5S, lean operations, experimentation culture, hypothesis-driven development, A/B testing, MVP design, knowledge management, decision logs, ADRs, after-action reviews, competitive intelligence, SWOT, Porter's Five Forces, battlecards, pivoting strategy, lean startup, business model canvas, signal detection, scenario planning, learning velocity, value stream mapping, Gemba walks. Trigger when discussing ANY organisational learning, strategic adaptability, continuous improvement, competitive analysis, experimentation, knowledge systems, or pivot/persevere decisions. Also for startup strategy around product-market fit or validated learning. If it touches learning faster, adapting better, or competing smarter — use this skill.
Digital legacy agent — dead man's switch, final message executor, and ghost mode responder that preserves your digital presence. Use when the user wants to set up a dead man's switch, manage their digital will, or enable ghost mode.
| name | send-email |
| description | 邮件发送工具。配置 SMTP 发件人后,通过脚本发送纯文本或 HTML 邮件,支持附件、抄送、密送。在需要发送邮件通知、报告、自动化邮件时触发。 |
通过 SMTP 发送邮件的工具,支持 keyring 密钥管理。
--template 参数,支持自定义模板)本技能强制使用 keyring 管理发件人邮箱和密码,避免敏感信息暴露在命令行或上下文中。
pip install keyring
如果 keyring 未安装,脚本会自动使用备用存储方案(base64 编码的本地文件)。
在发送邮件前,必须先保存发件人邮箱到 keyring:
# 保存发件人邮箱(会提示输入)
python3 send_email.py username --save --email your-email@gd.chinamobile.com
# 或只运行 --save,然后交互输入
python3 send_email.py username --save
# 保存密码(会提示输入)
python3 send_email.py password --save
# 删除发件人邮箱
python3 send_email.py username --delete
# 删除密码
python3 send_email.py password --delete
# 查看发件人邮箱
python3 send_email.py username
# 查看密码状态
python3 send_email.py password
--email 参数直接指定发件人username --save 和 password --save 命令管理密钥推荐安装 markdown 库以支持 Markdown 自动转换:
pip install markdown keyring
如果不安装 markdown 库,脚本仍可正常发送纯文本和 HTML 邮件,但无法自动转换 Markdown。
cd $CLAWD/skills/send-email/scripts
# 配置 SMTP 服务器(中国移动邮箱默认配置)
python3 send_email.py smtp --host smtp.gd.chinamobile.com --port 465 --no-tls
# 配置发件人名称
python3 send_email.py sender --name "Your Name"
# 保存发件人邮箱到 keyring
python3 send_email.py username --save --email your-email@gd.chinamobile.com
# 查看当前配置
python3 send_email.py config
中国移动邮箱默认配置:
| 配置项 | 值 |
|---|---|
| SMTP 服务器 | smtp.gd.chinamobile.com |
| 端口 | 465 (SSL) |
| TLS | ❌ (使用 SSL) |
| 默认邮箱 | user@gd.chinamobile.com |
重要提示: 如果使用 Gmail,需要生成「应用专用密码」(App Password),而不是使用账户密码。
python3 send_email.py password --save
# 按提示输入密码
python3 send_email.py send \
--to recipient@example.com \
--subject "邮件主题" \
--body "邮件正文内容"
python3 send_email.py send \
--to recipient@example.com \
--subject "HTML 邮件" \
--body "<h1>标题</h1><p>正文内容</p>" \
--html
python3 send_email.py send \
--to recipient@example.com \
--subject "带附件的邮件" \
--body "请查看附件" \
--attachments "/path/to/file1.pdf" "/path/to/file2.png"
python3 send_email.py send \
--to recipient@example.com \
--cc cc1@example.com cc2@example.com \
--bcc bcc@example.com \
--subject "多人邮件" \
--body "邮件正文"
功能: 自动检测 Markdown 格式,自动提取并内嵌图片,无需手动指定!
python3 send_email.py send \
--to recipient@example.com \
--subject "Markdown 邮件(自动检测图片)" \
--body "# 标题\n\n\n\n这是正文内容"
工作流程:
 语法)src="cid:image")示例:发送包含多张图片的 Markdown
python3 send_email.py send \
--to recipient@example.com \
--subject "产品报告" \
--body "$(cat report.md)"
其中 report.md 内容:
# 产品更新报告
## 新功能展示
这是第一个功能截图:

这是第二个功能截图:

## 总结
如有问题,请联系我们。
结果: 收件人会收到一封格式美观的 HTML 邮件,图片直接显示在正文中!
功能: 图片直接显示在邮件正文中,不是链接。使用 CID(Content-ID)技术,兼容所有主流邮件客户端。
python3 send_email.py send \
--to recipient@example.com \
--subject "带内嵌图片的邮件" \
--html \
--body "<h1>标题</h1><p>正文内容</p><img src='/path/to/image.png'>" \
--inline-images "/path/to/image.png"
工作原理:
src="cid:filename")多张图片示例:
python3 send_email.py send \
--to recipient@example.com \
--subject "产品截图" \
--html \
--body "<h1>产品展示</h1><img src='/path/to/screenshot1.png'><br><img src='/path/to/screenshot2.png'>" \
--inline-images "/path/to/screenshot1.png" "/path/to/screenshot2.png"
重要提示:
--inline-images 必须配合 --html 参数使用(如未指定,会自动启用)src 属性完全一致image.png → cid:imagesend)| 参数 | 说明 | 必填 |
|---|---|---|
--to | 收件人邮箱 | ✅ |
--to-name | 收件人名称 | ❌ |
--subject | 邮件主题 | ✅ |
--body | 邮件正文 | ✅ |
--html | 使用 HTML 格式 | ❌ |
--template | 使用指定模板渲染邮件(模板文件名) | ❌ |
--title | 邮件标题(模板中使用,默认:"邮件摘要") | ❌ |
--attachments | 附件路径(可多个) | ❌ |
--inline-images | 内嵌图片路径(可多个,仅 HTML 模式) | ❌ |
--cc | 抄送邮箱(可多个) | ❌ |
--bcc | 密送邮箱(可多个) | ❌ |
username)| 参数 | 说明 |
|---|---|
--save | 保存发件人邮箱到 keyring(会提示输入) |
--delete | 删除保存的发件人邮箱 |
password)| 参数 | 说明 |
|---|---|
--save | 保存密码到 keyring(会提示输入) |
--delete | 删除保存的密码 |
配置文件保存在:~/.send_email_config.json
示例配置:
{
"smtp": {
"host": "smtp.gd.chinamobile.com",
"port": 465,
"use_tls": false
},
"sender": {
"name": "Your Name"
}
}
注意: 发件人邮箱通过 username --save 命令存储在 keyring 中,不在配置文件中。
创建一个 Markdown 文件 newsletter.md:
# 今日新闻摘要
## 科技头条
AI 技术持续突破,以下是最新进展:

## 产品更新
新功能界面展示:

---
如需了解更多,请访问我们的官网。
发送邮件(超级简单,无需指定任何图片参数!):
python3 send_email.py send \
--to recipient@example.com \
--subject "今日新闻摘要" \
--body "$(cat newsletter.md)"
结果: 脚本会自动:
假设你有两张产品截图:
cd ~/clawd/skills/send-email/scripts
# 准备 HTML 内容
cat > email_content.html << 'EOF'
<h1>产品更新通知</h1>
<p>大家好!</p>
<p>这是我们最新的产品截图:</p>
<img src="/Users/clark/Pictures/screenshot1.png" style="max-width: 600px; border-radius: 8px;">
<p>第二个功能展示:</p>
<img src="/Users/clark/Pictures/screenshot2.png" style="max-width: 600px; border-radius: 8px;">
<p>如有问题,请随时联系我们!</p>
<p>Best regards,<br>产品团队</p>
EOF
# 发送邮件
python3 send_email.py send \
--to recipient@example.com \
--subject "产品更新 - 新功能截图" \
--html \
--body "$(cat email_content.html)" \
--inline-images "/Users/clark/Pictures/screenshot1.png" "/Users/clark/Pictures/screenshot2.png"
结果: 收件人打开邮件后,图片会直接显示在邮件正文中,不需要点击链接。
假设你有现成的 HTML 内容:
python3 send_email.py send \
--to recipient@example.com \
--subject "产品截图" \
--html \
--body "<h1>产品展示</h1><img src='/path/to/image.png'>" \
--inline-images "/path/to/image.png"
何时使用手动指定:
假设你已经使用 crawl-from-x 和 translate 技能抓取并翻译了 X 推文,结果保存在 posts_zh.md。
现在发送邮件(一键搞定!):
python3 send_email.py send \
--to your-email@example.com \
--subject "今日 X 推文摘要" \
--body "$(cat /path/to/posts_zh.md)"
完整工作流:
# 步骤 1: 抓取 X 推文
crawl-from-x 抓取
# 步骤 2: 翻译为中文
使用 translate 技能翻译最新的文件
# 步骤 3: 发送邮件(自动检测 Markdown + 图片)
python3 send_email.py send \
--to your-email@example.com \
--subject "今日 X 推文摘要" \
--body "$(cat $CLAWD/skills/crawl-from-x/results/*_zh.md)"
自动化脚本:
创建 send-x-news.sh:
#!/bin/bash
cd ~/clawd/skills/crawl-from-x/scripts
python3 craw_hot.py crawl
LATEST_MD=$(ls -t ~/clawd/skills/crawl-from-x/results/*.md | head -1)
python3 ~/clawd/skills/send-email/scripts/send_email.py send \
--to your-email@example.com \
--subject "$(date +'%Y-%m-%d') X 推文摘要" \
--body "$(cat $LATEST_MD)"
添加到 cron:
crontab -e
# 添加:每天早上 8:00 执行
0 8 * * * ~/clawd/skills/send-email/scripts/send-x-news.sh
使用 --template 参数可以让邮件内容使用指定的模板进行渲染,提供更美观的视觉效果。
python3 send_email.py send \
--to recipient@example.com \
--subject "今日 X 推文摘要" \
--body "$(cat posts_zh.md)" \
--template default \
--title "X 帖子摘要"
参数说明:
--template:模板文件名(不含 .html 扩展名)
default(仿照 x.com 样式)templates/ 目录--title:邮件标题(模板中使用,默认:"邮件摘要")send-email 技能内置了一个名为 default 的默认模板,具有以下特点:
模板变量:
{{title}}:邮件标题(通过 --title 参数设置){{subtitle}}:副标题(自动生成时间戳){{content}}:邮件正文内容如果默认模板不满足需求,可以创建自定义模板:
templates/ 目录下创建新的 HTML 文件{{title}}、{{subtitle}}、{{content}} 作为变量占位符python3 send_email.py send \
--to recipient@example.com \
--subject "每周报告" \
--body "$(cat report.md)" \
--template my-template
模板示例: templates/default.html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>{{title}}</title>
<style>
/* 自定义样式 */
body { font-family: Arial, sans-serif; }
.container { max-width: 600px; margin: 0 auto; }
/* ... */
</style>
</head>
<body>
<div class="container">
<h1>{{title}}</h1>
<p class="subtitle">{{subtitle}}</p>
<div class="content">
{{content}}
</div>
</div>
</body>
</html>
模板功能与 Markdown 自动检测完全兼容:
# 检测 Markdown → 转换为 HTML → 应用模板 → 发送
python3 send_email.py send \
--to recipient@example.com \
--subject "X 推文摘要" \
--body "$(cat posts_zh.md)" \
--template default
处理流程:
send-email/
├── scripts/
│ └── send_email.py
└── templates/
├── default.html # 默认模板(仿照 x.com)
├── my-template.html # 自定义模板 1
└── weekly.html # 自定义模板 2
密钥管理(强制): 首次使用前必须运行 python send_email.py username --save 和 python send_email.py password --save 分别保存发件人邮箱和密码。这些信息会安全存储在 keyring 中,不会暴露在命令行或上下文中。
不要传递密钥: 发送邮件时不要使用 --email 或 --password 参数,这些信息会自动从 keyring 读取。这是为了保护密钥安全。
中国移动邮箱: 默认配置为 smtp.gd.chinamobile.com:465(SSL),默认发件人邮箱为 user@gd.chinamobile.com。
Markdown 自动检测(推荐):
--inline-images 或 --html 参数--html 参数强制指定为纯 HTML 模式内嵌图片:
<img src="path/to/image.png">myphoto.png → cid:myphoto图片路径:
http:// 和 https:// 开头的图片链接(外链)附件路径: 使用绝对路径或相对于执行目录的路径
测试: 首次使用时,建议先发送测试邮件给自己
keyring 备用方案: 如果 keyring 不可用,密钥会保存在 ~/.send_email_password 和 ~/.send_email_username(base64 编码),文件权限为 600。注意这不是加密,仅避免明文存储。
1. 首次配置(中国移动邮箱):
- python send_email.py smtp --host smtp.gd.chinamobile.com --port 465 --no-tls
- python send_email.py sender --name "Your Name"
- python send_email.py username --save --email your-email@gd.chinamobile.com
- python send_email.py password --save ← 输入密码
2. 后续发送:
- python send_email.py send --to to@example.com --subject "..." --body "..."
邮箱和密码自动从 keyring 读取
脚本会检测以下 Markdown 语法:
# 标题**粗体**```- 列表项 或 1. 列表项[文本](url) ⭐检测到以上任一语法,会自动转换为 HTML 格式。
支持两种语法:
Markdown 语法:

HTML 语法:
<img src="/path/to/image.png">
脚本会:
http:// 和 https:// 开头的链接cid:myimage)<img src="cid:myimage"> 引用keyring(密钥管理)markdown(Markdown 自动转换)安装依赖:
pip install keyring markdown
如果邮件过大,可能被拒收或放入垃圾邮件。