360 Secure SkillHub
360 安全技能中心

Email Sender

该 Skill 提供命令行脚本,通过 SMTP 或 SendGrid、Mailgun、Resend 等邮件服务发送邮件,支持 HTML 正文、附件,以及基于收件人 CSV 与 HTML 模板的批量发送,并返回含发送状态的 JSON。使用前需自行配置相应环境变量;脚本文件本身未包含在文件列表中。

分类:协作
jpengcheng523-netizen
jpengcheng523-netizen
热度 28.57
最近更新 2026-05-11 17:35:58

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add jpengcheng523-netizen/jpeng-email-sender
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
jpeng-email-sender
description
Email sending skill via SMTP or API providers. Supports attachments, HTML templates, and batch sending.
version
1.0.0
author
jpeng
tags
["email","smtp","notification","communication"]

Email Sender

Send emails via SMTP or API providers (SendGrid, Mailgun, Resend).

When to Use

  • User wants to send an email
  • Automated notifications
  • Batch email campaigns
  • HTML email with attachments

Configuration

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"

Usage

python3 scripts/send_email.py \
  --to "recipient@example.com" \
  --subject "Hello" \
  --body "This is the message body" \
  --html  # Optional: send as HTML

With attachments

python3 scripts/send_email.py \
  --to "recipient@example.com" \
  --subject "Report Attached" \
  --body "Please find attached." \
  --attach "/path/to/report.pdf"

Batch sending

python3 scripts/send_email.py \
  --batch recipients.csv \
  --template template.html \
  --subject "Newsletter"

Output

Returns JSON with send status:

{
  "success": true,
  "message_id": "msg_xxx",
  "to": "recipient@example.com"
}