← Back to Skills Marketplace
137
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install email-send-cn
Description
基于 Nodemailer 的邮件发送技能。使用 nodemailer + SMTP 向任意邮箱发送邮件。支持 163、QQ、Gmail 等主流 SMTP 服务。当用户请求发送邮件时触发。
README (SKILL.md)
Email Send Skill
使用 nodemailer 通过 SMTP 发送邮件。
安装依赖
使用前请先安装依赖:
npm install
这将安装包括 nodemailer 在内的所有必要依赖。
安全注意事项
- 请勿在命令行中直接使用真实的 SMTP 凭据,特别是在生产环境中
- 避免将 SMTP 密码提交到版本控制系统
- 使用环境变量或安全的配置管理系统来存储敏感信息
- 定期更新 SMTP 授权码以增强安全性
环境配置
SMTP 凭据通过环境变量配置:
| 变量 | 说明 | 示例 |
|---|---|---|
| SMTP_HOST | SMTP 服务器地址 | smtp.example.com |
| SMTP_PORT | 端口 (25/465/587) | 465 |
| SMTP_SECURE | 是否 SSL (true/false) | true |
| SMTP_USER | 用户名/邮箱 | [email protected] |
| SMTP_PASS | 授权码/密码 | your-smtp-password |
| SMTP_FROM | 发件人显示名 | Your Name \[email protected]> |
使用方式
直接调用脚本
SMTP_HOST=smtp.163.com \
SMTP_PORT=465 \
SMTP_SECURE=true \
[email protected] \
SMTP_PASS=your-smtp-password \
SMTP_FROM="Your Name \[email protected]>" \
node {baseDir}/scripts/send.js \
--to "[email protected]" \
--subject "Email Subject" \
--body "Email Body"
AI 调用方式
当用户请求发送邮件时,使用 exec 工具执行上述命令。
脚本参数
| 参数 | 必填 | 说明 |
|---|---|---|
| --to | 是 | 收件人邮箱 |
| --cc | 否 | 抄送 (逗号分隔多个) |
| --subject | 是 | 邮件主题 |
| --body | 是 | 邮件正文 |
| --html | 否 | body 是否为 HTML (设为 "true") |
常用 SMTP 配置
- 163 邮箱: smtp.163.com, 端口 465 (SSL) 或 587 (TLS)
- QQ 邮箱: smtp.qq.com, 端口 465 (SSL) 或 587 (TLS)
- Gmail: smtp.gmail.com, 端口 587 (TLS)
授权码需要在邮箱设置中获取。
Usage Guidance
This skill appears to do exactly what it says: run a Node script that uses nodemailer to send SMTP mail. Before installing, consider: (1) keep SMTP credentials secret—don’t paste them into chat or commit them to VCS; use environment variables or a secrets manager and prefer app-specific passwords or OAuth where available; (2) npm install will fetch nodemailer from the public registry—verify package.json/lock and run installs in a controlled environment if you worry about supply-chain risk; (3) test with a throwaway account before using real production credentials; and (4) be aware the agent will invoke a shell command (exec) that uses the environment variables you provide—ensure those variables are not present in logs or shared outputs.
Capability Analysis
Type: OpenClaw Skill
Name: email-send-cn
Version: 1.0.2
The skill is a straightforward utility for sending emails via SMTP using the reputable 'nodemailer' library. The implementation in 'scripts/send.js' correctly uses environment variables for credentials and provides a standard CLI interface for the AI agent to invoke. There are no signs of data exfiltration, malicious execution, or prompt injection; the code logic is entirely consistent with the stated purpose.
Capability Assessment
Purpose & Capability
Name/description (SMTP email send via nodemailer) match the required binaries (node), required env vars (SMTP_HOST, SMTP_USER, SMTP_PASS), and included files (scripts/send.js, package.json). The primary credential is SMTP_PASS which is appropriate for sending mail.
Instruction Scope
SKILL.md instructs installing dependencies (npm install) and running scripts/send.js with SMTP-related environment variables and command-line args. The instructions do not request unrelated files, extra credentials, or external endpoints beyond normal npm and SMTP servers; agent use of exec to run the command is consistent with the stated purpose.
Install Mechanism
This is an instruction-only skill but includes package.json/lock and instructs running npm install, which will fetch nodemailer from the npm registry. Pulling from npm is expected here but has moderate risk compared to a purely instruction-only script (downloads third-party code at install time). No downloads from unknown personal domains or URL shorteners are present.
Credentials
Only SMTP-related environment variables are required (host, user, pass, optional port/secure/from). There are no unrelated secrets requested. The number of env vars is proportional to the task.
Persistence & Privilege
The skill is not always-enabled, is user-invocable, and does not request elevated or persistent system privileges or modify other skills' configuration. It only executes a local Node script when invoked.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install email-send-cn - After installation, invoke the skill by name or use
/email-send-cn - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
- 添加 _meta.json 文件。
- 在 SKILL.md 中加入了 metadata 字段,增强了 skill 元数据描述(如 emoji、必需环境变量、依赖项等)。
- 邮件脚本调用命令中的路径占位符由绝对路径改为 {baseDir}/scripts/send.js。
- 删除环境变量说明块,相关要求整合进 metadata 字段。
v1.0.1
- Added a dedicated environment variable list with descriptions to SKILL.md for clearer SMTP configuration.
- Updated documentation to include important security best practices for managing SMTP credentials.
- Improved example usage to use placeholder data instead of real credentials.
- Removed the sample configuration file scripts/config.json.
v1.0.0
- Complete rewrite: migrated from `msmtp`-based shell usage to a Node.js implementation using Nodemailer.
- Added scripts for sending email via SMTP with support for major providers (163, QQ, Gmail, etc).
- Emails can be sent by running a Node.js script (`scripts/send.js`) with detailed argument support (to, cc, subject, body, html).
- SMTP credentials now fully managed by environment variables for flexibility and security.
- Installation now uses npm with a full dependency list in `package.json` and `package-lock.json`.
- Obsolete documentation and files related to previous msmtp usage removed.
Metadata
Frequently Asked Questions
What is Email Send Skill?
基于 Nodemailer 的邮件发送技能。使用 nodemailer + SMTP 向任意邮箱发送邮件。支持 163、QQ、Gmail 等主流 SMTP 服务。当用户请求发送邮件时触发。 It is an AI Agent Skill for Claude Code / OpenClaw, with 137 downloads so far.
How do I install Email Send Skill?
Run "/install email-send-cn" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Email Send Skill free?
Yes, Email Send Skill is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Email Send Skill support?
Email Send Skill is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Email Send Skill?
It is built and maintained by 周小虎 (@anbangzhiguo); the current version is v1.0.2.
More Skills