360 Secure SkillHub
360 安全技能中心

Save To Email

该 Skill 提供 Bash 脚本 scripts/send-email.sh,借助 curl 和 python3 调用 Resend 邮件服务,把指定主题和 HTML 正文发送给收件人。使用前需在技能根目录 .env 或环境变量中配置 Resend API 密钥与发件人地址,适合发送报告、摘要或通知类邮件。

chjm-ai
chjm-ai
热度 53.58
最近更新 2026-05-11 17:33:49
分类:协作依赖:代码执行 / 第三方 API / 读写文件应用场景:自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add save-to-email
Metadata
name
save-to-email
description
Send emails through the Resend API. Use when the user wants to send an email, deliver a report by email, forward generated content to an inbox, or trigger an email notification. Trigger on phrases like "send email", "发邮件", "邮件通知", "email this", or "把结果发到邮箱".
metadata
{"openclaw":{"requires":{"env":["RESEND_API_KEY","RESEND_FROM"],"bins":["curl","python3"]},"primaryEnv":"RESEND_API_KEY"}}

Save To Email

Send HTML emails with Resend.

When To Use

Use this skill when the user wants Claude to:

  • send a formatted email
  • email a generated report or summary
  • deliver HTML content to one or more recipients
  • trigger a lightweight notification email

Setup

This skill requires a local .env file in the skill root with:

RESEND_API_KEY=your_resend_api_key
RESEND_FROM="Your Name <sender@yourdomain.com>"

If .env is missing, load the variables from the shell environment before using the script.

Command

./scripts/send-email.sh "recipient@example.com" "Subject" "<p>HTML content</p>"

Input Rules

  • Argument 1: recipient email address
  • Argument 2: subject
  • Argument 3: HTML body

Use valid HTML. For plain text, wrap content in <pre> or convert line breaks to <br>.

Examples

./scripts/send-email.sh \
  "recipient@example.com" \
  "Daily Report" \
  "<h2>Summary</h2><p>All jobs finished successfully.</p>"
html="<h1>Project Update</h1><ul><li>Task A done</li><li>Task B in progress</li></ul>"
./scripts/send-email.sh "recipient@example.com" "Project Status" "$html"

Notes

  • The script reads .env automatically when present.
  • Do not hardcode API keys or private sender addresses in this repository.
  • Check README.md for public setup guidance.