Email Sender Pro
/install email-agent
Send SMTP Email
Use this skill when the task is to send a simple email through SMTP with a mailbox account.
Embedded SMTP Config
If the runtime environment does not support .env, use the following embedded configuration block.
The sending script can fall back to this block when the env file is missing.
# Provider preset: 126, qq, sina, aliyun, custom
EMAIL_PROVIDER=126
# If EMAIL_PROVIDER=custom, fill these yourself.
SMTP_HOST=smtp.126.com
SMTP_PORT=465
# true for SMTPS on port 465, false for STARTTLS on port 587.
SMTP_USE_SSL=true
# Usually the mailbox address.
SMTP_USERNAME=your_email_username
# 126 / QQ commonly use an SMTP authorization code here.
# Sina / Aliyun may use the mailbox password depending on account settings.
SMTP_PASSWORD=your_smtp_secret
FROM_EMAIL=your_email_username
FROM_NAME=your_name
# Seconds
SMTP_TIMEOUT=30
Trigger Cues
Use this skill when the user asks for any of the following:
- send a one-off test email through SMTP
- configure
.envfor a mailbox account such as126,qq,sina, oraliyun - scaffold a reusable SMTP email sender
- debug SMTP host, port, SSL, login, or authorization-code issues
Supported Providers
Built-in presets are available for:
126qqsinaaliyuncustom
See references/providers.md for preset host and authentication notes.
Workflow
- Read
.envfrom the repo root. If it does not exist, fall back to the embedded config block in this file. - Resolve provider defaults for
126,qq,sina, oraliyun. If the provider is not listed, requireSMTP_HOSTandSMTP_PORT. - Read the message inputs from the user request: recipient, subject, and body.
- Prefer
scripts/send_email.py --dry-runfirst when validating configuration. - Run
scripts/send_email.pywith runtime message arguments once the sender, recipient, and secret are confirmed.
Default Behavior
SMTP_USERNAMEdefaults toFROM_EMAILwhen left empty.SMTP_USE_SSL=truemeans SMTPS, typically on port465.SMTP_USE_SSL=falsemeans SMTP withSTARTTLS, typically on port587.SMTP_PASSWORDis treated as the one secret field, whether the provider expects an authorization code or the mailbox password.
Safety Rules
- Never print the full value of
SMTP_PASSWORD. - Treat
SMTP_PASSWORDas either an SMTP authorization code or the mailbox password, depending on provider policy. - Before a real send, make sure
FROM_EMAILandTO_EMAILare not placeholder values unless the user explicitly wants a dry run. - In normal SMTP usage, keep
FROM_EMAILaligned with the authenticated mailbox unless the provider supports aliases. - Prefer a single test message before attempting repeated sends.
Required Inputs
EMAIL_PROVIDERSMTP_PASSWORDFROM_EMAIL- recipient email
- subject
- body
Optional Inputs
SMTP_HOSTSMTP_PORTSMTP_USE_SSLSMTP_USERNAMEFROM_NAMESMTP_TIMEOUT
Minimal .env Contract
For preset providers, the minimum practical configuration is:
EMAIL_PROVIDER=qq
SMTP_PASSWORD=your_smtp_secret
[email protected]
For custom, also set:
SMTP_HOSTSMTP_PORTSMTP_USE_SSL
Common Commands
Validate config without sending:
python scripts/send_email.py --to-email [email protected] --email-subject "Test" --email-body "Hello" --dry-run
Send a real email:
python scripts/send_email.py --to-email [email protected] --email-subject "Test" --email-body "Hello"
Use a different env file:
python scripts/send_email.py --env-file .tmp-send.env --to-email [email protected] --email-subject "Test" --email-body "Hello"
Failure Handling
- Authentication error: verify whether the provider expects an authorization code instead of the normal mailbox password.
- Connection or timeout error: verify host, port, SSL mode, and whether the mailbox enabled SMTP.
- Sender rejected: make
FROM_EMAILmatch the authenticated mailbox unless the provider explicitly supports aliases. - Custom provider: set
SMTP_HOST,SMTP_PORT, andSMTP_USE_SSLexplicitly in.env.
Example Requests
- "Send a test email to
[email protected]through QQ SMTP." - "给
[email protected]发一个主题为xxx内容为xxx的邮件。" - "Set up
.envfor 126 mailbox SMTP." - "Why does my SMTP login pass but the server rejects the sender address?"
Resources
- Provider notes: references/providers.md
- Sending script:
scripts/send_email.py
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install email-agent - 安装完成后,直接呼叫该 Skill 的名称或使用
/email-agent触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Email Sender Pro 是什么?
Send email through SMTP providers such as 126, QQ, Sina, or Aliyun Mail using an SMTP authorization code or mailbox password. Use when the user wants Codex t... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 166 次。
如何安装 Email Sender Pro?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install email-agent」即可一键安装,无需额外配置。
Email Sender Pro 是免费的吗?
是的,Email Sender Pro 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Email Sender Pro 支持哪些平台?
Email Sender Pro 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Email Sender Pro?
由 Xinhai Zou(@seanmwx)开发并维护,当前版本 v1.0.0。