resend-email — Resend邮件发送
v1.0.3通过Resend API从任何已验证域名发送邮件。用于发送邮件、通知或自动消息时。支持HTML和纯文本。
详细分析 ▾
运行时依赖
版本
添加接收/webhook配置说明(Clawdbot + Tailscale Funnel + MagicDNS);包含示例入站转换
安装命令 点击复制
技能文档
Send emails from any Resend-verified domain using the Resend API.
Quick 开始
# Send simple email
bash skills/resend-email/scripts/send.sh \
--to "recipient@example.com" \
--subject "Subject Line" \
--body "Email body text"# With custom from address
bash skills/resend-email/scripts/send.sh \
--to "recipient@example.com" \
--from "you@yourdomain.com" \
--subject "Subject" \
--body "Body"
Direct API Call
curl -X POST 'https://api.resend.com/emails' \
-H "Authorization: Bearer $(cat ~/.config/resend/credentials.json | jq -r .api_key)" \
-H "Content-Type: application/json" \
-d '{
"from": "noreply@yourdomain.com",
"to": ["recipient@example.com"],
"subject": "Subject",
"text": "Plain text body"
}'
Configuration
- Credentials:
~/.配置/resend/credentials.json - Domain: 任何 Resend-verified domain (configured 在...中 Resend 账户)
- 默认 从: 设置 在...中
credentials.json(e.g.,noreply@yourdomain.com)
Receiving (Webhook + Clawdbot)
Use this when you want Resend inbound emails to trigger Clawdbot automatically.
1) Enable Clawdbot hooks
{
hooks: {
enabled: true,
token: "",
path: "/hooks",
transformsDir: "~/.clawdbot/hooks",
mappings: [
{
id: "resend",
match: { path: "resend" }, // relative to /hooks (no leading slash)
action: "agent",
deliver: true,
channel: "telegram",
transform: { module: "resend-inbound.js", export: "transform" }
}
]
}
}
Important: match.path relative 到 /hooks (e.g., /hooks/resend → resend).
2) Expose webhook (Tailscale Funnel)
If your gateway is local-only, expose it via Funnel:
/Applications/Tailscale.app/Contents/MacOS/Tailscale funnel --bg 18789
MagicDNS + HTTPS certs 必须 已启用 在...中 tailnet 对于 TLS 到 work.
3) Configure Resend webhook
In Resend → Webhooks:
- URL:
https://<-tailnet-host>.ts.net/hooks/resend?令牌= - 事件:
email.received
Resend cannot set custom headers, so use ?token=.
4) 获取 满 email content
Resend webhooks do not include body text. Use the receiving API:
GET https://api.resend.com/emails/receiving/:id
(See resend-inbound.js for an example transform that fetches the body.)
Email Voice: Bureaucrat
See references/voice-bureaucrat.md for the default email tone.
键 traits:
- Warm, patient, endlessly polite
- Passive voice (" recommended …")
- Official jargon ("compliance 框架", "pursuant 到 section 14(b)")
- Everything framed 作为 "best practices"
- Bullet points 开始 带有 "Please note …"
- Ends 带有 "我们 appreciate cooperation"
Tone: DMV supervisor 谁 smiles 当...时 denying 表单 × LinkedIn thought-leader 谁 genuinely believes bureaucracy beautiful.
When drafting emails, apply this voice unless instructed otherwise.
HTML Emails
curl -X POST 'https://api.resend.com/emails' \
-H "Authorization: Bearer $RESEND_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "noreply@yourdomain.com",
"to": ["recipient@example.com"],
"subject": "Subject",
"html": "Hello
HTML content
"
}'
Notes
发送.shpreserves line breaks 在...中--body(否 literal\n输出).- 使用
--html对于 rich formatting; 默认 plain text.
Common Patterns
Transactional 通知:
# Order confirmation, welcome email, etc.
bash skills/resend-email/scripts/send.sh \
--to "customer@example.com" \
--subject "Your Request Has Been Processed" \
--body "$(cat <<'EOF'
Dear Valued Individual,Please note that your recent submission has been received and processed in accordance with standard operating procedures.
It should be understood that all requests are handled in the order received, pursuant to our established compliance framework.
We appreciate your cooperation in maintaining an orderly process.
Warm regards,
Clawd
Agent Services Division
EOF
)"
回复 到 inquiry: Apply bureaucrat voice. Be helpful while maintaining the veneer of official procedure.
免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制