name: send-email description: Send emails via SMTP. Configure in ~/.openclaw/openclaw.json under skills.entries.send-email.env. metadata: {"openclaw":{"emoji":"📧","requires":{"anyBins":["python3"]}}}
Send emails via the Python script. SMTP settings are injected by OpenClaw at runtime when the script runs (from ~/.openclaw/openclaw.json → skills.entries.send-email.env). Do not read any config file (e.g. ~/.openclaw/openclaw.json or workspace/openclaw.json) — that would expose credentials in tool output. Just run the script; env is injected automatically. Do not use ~/.msmtprc.
Configure in ~/.openclaw/openclaw.json:
"skills": {
"entries": {
"send-email": {
"enabled": true,
"env": {
"EMAIL_SMTP_SERVER": "smtp.163.com",
"EMAIL_SMTP_PORT": "465",
"EMAIL_SENDER": "your-email@163.com",
"EMAIL_SMTP_PASSWORD": "YOUR_AUTH_CODE"
}
}
}
}
| Variable | Description |
|---|---|
| EMAIL_SMTP_SERVER | SMTP server, e.g. smtp.163.com, smtp.gmail.com |
| EMAIL_SMTP_PORT | Port, 465 (SSL) or 587 (TLS) |
| EMAIL_SENDER | Sender email address |
| EMAIL_SMTP_PASSWORD | Authorization code / app password (163/QQ: auth code; Gmail: App Password) |
skills.entries.send-email.env when the script runs — do not use the read tool on ~/.openclaw/openclaw.json or workspace/openclaw.json (exposes secrets). If the skill is enabled, assume env is configured; do not ask the user for passwords. Do not use ~/.msmtprc.bash
python3 ~/.openclaw/workspace/skills/send-email/send_email.py "recipient" "Subject" "Body"python3 ~/.openclaw/workspace/skills/send-email/send_email.py "recipient" "Subject" "Body" "/path/to/file.pdf"來源於7w4.net。
python3 ~/.openclaw/workspace/skills/send-email/send_email.py 'recipient@example.com' 'Subject' 'Body text'
python3 ~/.openclaw/workspace/skills/send-email/send_email.py 'recipient@example.com' 'Subject' 'Body' '/path/to/file.pdf'
smtp.163.com:465, requires authorization code (not login password)smtp.gmail.com:587, requires App Passwordsmtp.qq.com:465, requires authorization codeEMAIL_SMTP_PASSWORD is the authorization code or App Password.EMAIL_SMTP_SERVER and EMAIL_SMTP_PORT.這個 Skill 質量較好,郵件傳送功能完整,支援多種主流郵箱服務商,還帶附件功能。文件寫得很清楚,配置說明詳細,新手也能快速上手。不過 Bash 版本依賴 msmtp/mutt 這類外部程式,在部分系統上可能無法直接使用。總體來說是一個實用性強、文件完善的 Skill,但跨平臺相容性還有最佳化空間。