技能图谱SKILLSGROVE
技能图谱/效率工具/jholhewres/devclaw-skills/email

email

安装

$npx skills add https://github.com/jholhewres/devclaw-skills --skill email
$git clone --depth 1 https://github.com/jholhewres/devclaw-skills.git /tmp/devclaw-skills && mkdir -p ~/.claude/skills && cp -r /tmp/devclaw-skills/skills/email ~/.claude/skills/email
请帮我安装这个 Agent Skill:https://github.com/jholhewres/devclaw-skills/tree/0177c36eb6dcdfe3f891fd332ef538a3d84cc693/skills/email ,先阅读它的 SKILL.md 和脚本,确认安全后再安装到我的技能目录。

简介

原文描述 · MITSend emails via SMTP or API services (SendGrid, Mailgun, Resend)
以下 SKILL.md 内容转载自 jholhewres/devclaw-skills(提交 0177c36),依据 MIT 许可证转载正文(文字未改动;仅省略文件头元数据、将图片显示为链接,超长内容会截断);版权归 2026 DevClaw 所有。许可证:LICENSE。仅展示说明文件,附带脚本请在原仓库查看。

Email

Send emails using various email services.

Setup

  1. Check existing credentials (per provider):

    vault_get resend_api_key
    vault_get sendgrid_api_key
    vault_get mailgun_api_key
    vault_get mailgun_domain
    vault_get postmark_server_token
    
  2. If not configured, choose one provider and save to vault:

Option 1: Resend (Recommended - Free tier)

# Send email
curl -s -X POST "https://api.resend.com/emails" \
  -H "Authorization: Bearer $RESEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "onboarding@resend.dev",
    "to": "recipient@example.com",
    "subject": "Hello from DevClaw",
    "html": "<h1>Hello!</h1><p>This is a test email.</p>"
  }'

Option 2: SendGrid

# Send email
curl -s -X POST "https://api.sendgrid.com/v3/mail/send" \
  -H "Authorization: Bearer $SENDGRID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "personalizations": [{"to": [{"email": "recipient@example.com"}]}],
    "from": {"email": "sender@example.com"},
    "subject": "Hello from DevClaw",
    "content": [{"type": "text/plain", "value": "Email body text"}]
  }'

Option 3: Mailgun

# Send email
curl -s -X POST "https://api.mailgun.net/v3/$MAILGUN_DOMAIN/messages" \
  -u "api:$MAILGUN_API_KEY" \
  -d from="sender@$MAILGUN_DOMAIN" \
  -d to="recipient@example.com" \
  -d subject="Hello from DevClaw" \
  -d text="Email body text"

Option 4: Postmark

# Send email
curl -s -X POST "https://api.postmarkapp.com/email" \
  -H "X-Postmark-Server-Token: $POSTMARK_SERVER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "From": "sender@example.com",
    "To": "recipient@example.com",
    "Subject": "Hello from DevClaw",
    "TextBody": "Email body text"
  }'

Option 5: SMTP via curl (Basic)

# Requires smtp server access
curl -s --url "smtp://smtp.example.com:587" \
  --ssl-reqd \
  --mail-from "sender@example.com" \
  --mail-rcpt "recipient@example.com" \
  --user "username:password" \
  -T - <<EOF
From: sender@example.com
To: recipient@example.com
Subject: Hello from DevClaw

Email body text
EOF

With Attachments (Resend)

# Send with attachment (base64 encoded)
curl -s -X POST "https://api.resend.com/emails" \
  -H "Authorization: Bearer $RESEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "onboarding@resend.dev",
    "to": "recipient@example.com",
    "subject": "Document attached",
    "html": "<p>Please find attached document.</p>",
    "attachments": [{
      "filename": "document.pdf",
      "content": "'$(base64 -w0 document.pdf)'"
    }]
  }'

Tips

  • Resend: Free 3000 emails/month, easiest API
  • SendGrid: Free 100 emails/day forever
  • Mailgun: Free 5000 emails/month for 3 months
  • Use HTML + plain text for better deliverability
  • Always verify sender domain for production

Triggers

send email, email, mail, smtp, sendgrid, mailgun, resend, email api

查看许可证全文(MIT)
MIT License

Copyright (c) 2026 DevClaw

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.