Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Send emails via SMTP (Gmail, Outlook, etc.). Supports attachments, HTML content, and multiple recipients. Use when user asks to send email, compose email, or email someone.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-17 | ✗→✓ | ▲ Improved | 8% | 0% |
| case-18 | ✗→✓ | ▲ Improved | -11% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 1% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 136% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 56% | 0% |
通过 SMTP 协议发送邮件,支持 Gmail、Outlook、企业邮箱等。
如果使用 Gmail,需要:
联系 IT 部门获取:
在 .env 文件中添加以下环境变量:
bash# 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 脚本:
bashpython scripts/send_email.py \ --to recipient@example.com \ --subject "邮件主题" \ --body "邮件正文"
| 参数 | 必需 | 说明 | |------|------|------| | --to | 是 | 收件人邮箱(多个用逗号分隔) | | --subject | 是 | 邮件主题 | | --body | 是 | 邮件正文 | | --cc | 否 | 抄送邮箱(多个用逗号分隔) | | --bcc | 否 | 密送邮箱(多个用逗号分隔) | | --attachment | 否 | 附件路径(多个用逗号分隔) | | --is_html | 否 | 正文是否为 HTML 格式(默认 false) | | --from_name | 否 | 发件人显示名称 |
发送简单邮件:
bashpython scripts/send_email.py \ --to friend@example.com \ --subject "周末聚会" \ --body "这周末有空吗?一起吃饭吧!"
发送 HTML 邮件带附件:
bashpython scripts/send_email.py \ --to boss@company.com \ --subject "项目报告" \ --body "<h1>项目进度报告</h1><p>详见附件...</p>" \ --is_html true \ --attachment "report.pdf,chart.xlsx" \ --from_name "张三"
发送给多人:
bashpython scripts/send_email.py \ --to "alice@example.com,bob@example.com" \ --cc "manager@example.com" \ --subject "会议纪要" \ --body "今天的会议纪要如下..."
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_USE_TLS=trueSMTP_SERVER=smtp-mail.outlook.com
SMTP_PORT=587
SMTP_USE_TLS=trueSMTP_SERVER=smtp.qq.com
SMTP_PORT=587
SMTP_USE_TLS=trueSMTP_SERVER=smtp.163.com
SMTP_PORT=587
SMTP_USE_TLS=trueSMTP_SERVER=smtp.company.com
SMTP_PORT=587
SMTP_USE_TLS=trueGmail:
Outlook:
运行测试脚本验证配置:
bashpython scripts/test_smtp.py
如果测试失败,检查:
.env 文件配置是否正确Other measured skills in the registry, with their headline benchmark lift.