Globales Ranking · von 601 Skills
smtp-email-sender AI Agent Skill
Quellcode ansehen: openakita/openakita
SafeInstallation
npx skills add openakita/openakita --skill smtp-email-sender 5
Installationen
SMTP Email Sender
通过 SMTP 协议发送邮件,支持 Gmail、Outlook、企业邮箱等。
前置要求
1. Gmail 用户
如果使用 Gmail,需要:
- 启用两步验证
- 创建应用专用密码(App Password)
- 访问:https://myaccount.google.com/apppasswords
- 选择"邮件"和应用名称
- 复制生成的 16 位密码
2. Outlook/Hotmail 用户
- 启用两步验证
- 创建应用密码:https://account.microsoft.com/security
- 或使用普通密码(如果允许)
3. 企业邮箱用户
联系 IT 部门获取:
- SMTP 服务器地址
- SMTP 端口(通常 587 或 465)
- 是否需要 SSL/TLS
配置
在 .env 文件中添加以下环境变量:
# SMTP 配置
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=your_email@gmail.com
SMTP_PASSWORD=your_app_password # Gmail 使用应用专用密码
SMTP_USE_TLS=true或者首次使用时运行配置脚本。
使用方法
基本用法
调用 send_email.py 脚本:
python scripts/send_email.py \
--to recipient@example.com \
--subject "邮件主题" \
--body "邮件正文"完整参数
| 参数 | 必需 | 说明 |
|---|---|---|
--to |
是 | 收件人邮箱(多个用逗号分隔) |
--subject |
是 | 邮件主题 |
--body |
是 | 邮件正文 |
--cc |
否 | 抄送邮箱(多个用逗号分隔) |
--bcc |
否 | 密送邮箱(多个用逗号分隔) |
--attachment |
否 | 附件路径(多个用逗号分隔) |
--is_html |
否 | 正文是否为 HTML 格式(默认 false) |
--from_name |
否 | 发件人显示名称 |
示例
发送简单邮件:
python scripts/send_email.py \
--to friend@example.com \
--subject "周末聚会" \
--body "这周末有空吗?一起吃饭吧!"发送 HTML 邮件带附件:
python scripts/send_email.py \
--to boss@company.com \
--subject "项目报告" \
--body "<h1>项目进度报告</h1><p>详见附件...</p>" \
--is_html true \
--attachment "report.pdf,chart.xlsx" \
--from_name "张三"发送给多人:
python scripts/send_email.py \
--to "alice@example.com,bob@example.com" \
--cc "manager@example.com" \
--subject "会议纪要" \
--body "今天的会议纪要如下..."支持的 SMTP 配置
Gmail
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_USE_TLS=trueOutlook/Hotmail
SMTP_SERVER=smtp-mail.outlook.com
SMTP_PORT=587
SMTP_USE_TLS=trueQQ 邮箱
SMTP_SERVER=smtp.qq.com
SMTP_PORT=587
SMTP_USE_TLS=true163 邮箱
SMTP_SERVER=smtp.163.com
SMTP_PORT=587
SMTP_USE_TLS=true企业邮箱(示例)
SMTP_SERVER=smtp.company.com
SMTP_PORT=587
SMTP_USE_TLS=true常见问题
1. 认证失败
Gmail:
- 确保启用了两步验证
- 使用应用专用密码,不是普通密码
- 检查是否开启了"不够安全的应用"访问(不推荐)
Outlook:
- 检查是否需要应用密码
- 确认 SMTP 地址正确
2. 连接超时
- 检查防火墙设置
- 尝试端口 465(SSL)代替 587(TLS)
- 确认 SMTP 服务器地址正确
3. 附件太大
- Gmail 限制 25MB
- Outlook 限制 20MB
- 大文件建议使用云盘链接
安全建议
- 永远不要在代码中硬编码密码
- 使用环境变量或加密的配置文件
- 定期更换应用专用密码
- 不要在公共网络使用 SMTP 发送敏感信息
故障排除
运行测试脚本验证配置:
python scripts/test_smtp.py如果测试失败,检查:
.env文件配置是否正确- 网络连接是否正常
- 邮箱账号密码是否正确
- 防火墙是否阻止 SMTP 端口
Installationen
Sicherheitsprüfung
Quellcode ansehen
openakita/openakita
Mehr aus dieser Quelle
Power your AI Agents with
the best open-source models.
Drop-in OpenAI-compatible API. No data leaves Europe.
Explore Inference APIGLM
GLM 5
$1.00 / $3.20
per M tokens
Kimi
Kimi K2.5
$0.60 / $2.80
per M tokens
MiniMax
MiniMax M2.5
$0.30 / $1.20
per M tokens
Qwen
Qwen3.5 122B
$0.40 / $3.00
per M tokens
So verwenden Sie diesen Skill
Install smtp-email-sender by running npx skills add openakita/openakita --skill smtp-email-sender in your project directory. Führen Sie den obigen Installationsbefehl in Ihrem Projektverzeichnis aus. Die Skill-Datei wird von GitHub heruntergeladen und in Ihrem Projekt platziert.
Keine Konfiguration erforderlich. Ihr KI-Agent (Claude Code, Cursor, Windsurf usw.) erkennt installierte Skills automatisch und nutzt sie als Kontext bei der Code-Generierung.
Der Skill verbessert das Verständnis Ihres Agenten für smtp-email-sender, und hilft ihm, etablierte Muster zu befolgen, häufige Fehler zu vermeiden und produktionsreifen Code zu erzeugen.
Was Sie erhalten
Skills sind Klartext-Anweisungsdateien — kein ausführbarer Code. Sie kodieren Expertenwissen über Frameworks, Sprachen oder Tools, das Ihr KI-Agent liest, um seine Ausgabe zu verbessern. Das bedeutet null Laufzeit-Overhead, keine Abhängigkeitskonflikte und volle Transparenz: Sie können jede Anweisung vor der Installation lesen und prüfen.
Kompatibilität
Dieser Skill funktioniert mit jedem KI-Coding-Agenten, der das skills.sh-Format unterstützt, einschließlich Claude Code (Anthropic), Cursor, Windsurf, Cline, Aider und anderen Tools, die projektbezogene Kontextdateien lesen. Skills sind auf Transportebene framework-agnostisch — der Inhalt bestimmt, für welche Sprache oder welches Framework er gilt.
Chat with 100+ AI Models in one App.
Use Claude, ChatGPT, Gemini alongside with EU-Hosted Models like Deepseek, GLM-5, Kimi K2.5 and many more.