Install
openclaw skills install jpeng-email-senderEmail sending skill via SMTP or API providers. Supports attachments, HTML templates, and batch sending.
openclaw skills install jpeng-email-senderSend emails via SMTP or API providers (SendGrid, Mailgun, Resend).
Set environment variables:
# SMTP mode
export EMAIL_SMTP_HOST="smtp.gmail.com"
export EMAIL_SMTP_PORT="587"
export EMAIL_SMTP_USER="your@email.com"
export EMAIL_SMTP_PASS="your-app-password"
# Or API mode (SendGrid)
export EMAIL_SENDGRID_API_KEY="SG.xxx"
# Or API mode (Resend)
export EMAIL_RESEND_API_KEY="re_xxx"
python3 scripts/send_email.py \
--to "recipient@example.com" \
--subject "Hello" \
--body "This is the message body" \
--html # Optional: send as HTML
python3 scripts/send_email.py \
--to "recipient@example.com" \
--subject "Report Attached" \
--body "Please find attached." \
--attach "/path/to/report.pdf"
python3 scripts/send_email.py \
--batch recipients.csv \
--template template.html \
--subject "Newsletter"
Returns JSON with send status:
{
"success": true,
"message_id": "msg_xxx",
"to": "recipient@example.com"
}