Send emails via Resend API - no SMTP configuration needed.
Set environment variables in .env:
RESEND_API_KEY=your_resend_api_key
RESEND_FROM=onboarding@resend.dev # Optional, defaults to Resend test domain
Get API key at https://resend.com
openclaw run resend-email \
--to="recipient@example.com" \
--subject="Hello" \
--text="Plain text message"
openclaw run resend-email \
--to="user@example.com" \
--subject="Notification" \
--text="Your task is complete."
openclaw run resend-email \
--to="user@example.com" \
--subject="Welcome" \
--html="<h1>Welcome!</h1><p>Thanks for joining.</p>"
openclaw run resend-email \
--to="user1@example.com,user2@example.com,user3@example.com" \
--subject="Team Update" \
--text="Meeting at 3 PM."
openclaw run resend-email \
--to="primary@example.com" \
--cc="manager@example.com" \
--bcc="archive@example.com" \
--subject="Report" \
--text="Please find the attached report."
When agent needs to send email:
# Use exec to call the skill
exec openclaw run resend-email \
--to="recipient@example.com" \
--subject="Automated Notification" \
--text="This email was sent automatically by the agent."
| Variable | Required | Default | Description |
|---|---|---|---|
| ---------- | ---------- | --------- | ------------- |
RESEND_API_KEY | Yes | - | Your Resend API key |
RESEND_FROM | No | onboarding@resend.dev | Default sender address |
onboarding@resend.dev (default, no setup required)noreply@yourdomain.com (requires domain verification in Resend dashboard)"RESEND_API_KEY not configured"
RESEND_API_KEY in .env file or environment"Failed to send email: Unauthorized"
"Failed to send email: Bad Request"
from address is verified (for custom domains)scripts/send_email.py - Main email sending script共 1 个版本