Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

send-email-2发送电子邮件 2

Agent Skill

send-email-2 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

24,677

周安装

1,060

GitHub Stars

公开资料未说明

下载量

8,650
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:send-email-2(发送电子邮件 2)
来源仓库:https://github.com/wangyendt/send-email-2
安装命令:
openclaw skills install send-email-2
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install send-email-2

简介

通过 SMTP 发送支持 HTML、附件和模板的电子邮件。

  • 适用于需要自动发送邮件、通知或批量消息的场景。send-email-2 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 调用时需提供收件人、主题、内容、附件路径及 SMTP 配置。
  • 安装后需配置邮箱账号、授权码及服务器信息方可使用。
  • 涉及敏感信息传输,建议启用 TLS 并限制发信频率。

SKILL.md

name
send-email
description
Send emails via SMTP with support for HTML formatting, file attachments, and email templates. Use when users ask to: (1) Send an email, (2) Email someone, (3) Send a notification, (4) Use email templates, or (5) Send files via email.
dependencies
python>=3.8, markdown>=3.4.0

Send Email

Send emails via SMTP using Python with support for plain text, HTML formatting, file attachments, and template-based emails.

Key Features

  • Default Sender Email: Automatically uses agent_skill_test@126.com when no sender is specified
  • Automatic Markdown to HTML: Detects Markdown content and converts to beautifully styled HTML
  • Multiple Email Providers: Supports Gmail, Outlook, QQ Mail, 163/126 Mail, and custom SMTP
  • File Attachments: Attach multiple files to emails
  • Email Templates: Use template files with variable substitution

Interactive Email Sending Flow

This skill guides you through the email sending process step by step.

Step 1: Collect Basic Email Information

Ask the user for the following required information. If any is missing, prompt the user to provide it:

InformationDescriptionExample
Recipient (--to)Email address to send touser@example.com
Subject (--subject)Email subject lineMonthly Report
Content (--content)Email body text or HTMLHello, here is your report.

IMPORTANT - Default Sender Email Behavior:

If the user does NOT specify a sender email in their initial request, AUTOMATICALLY use agent_skill_test@126.com as the default sender. DO NOT ask the user which email to send from.

Only ask the user for a different sender email if they explicitly mention wanting to use their own email address.

When using the default agent_skill_test@126.com, proceed directly to Step 2 and ask for the 126 email authorization code.

Step 2: Identify Email Provider and Collect Credentials

Based on the sender's email address domain, identify the email provider and request the appropriate credentials.

Email Provider Detection

@gmail.com, @googlemail.com   → Gmail
@outlook.com, @hotmail.com, @live.com, @office365.com → Outlook/Office 365
@qq.com, @vip.qq.com          → QQ Mail
@163.com, @126.com            → NetEase Mail
@aliyun.com, @aliyun-inc.com  → Aliyun Mail
@sendgrid.net, @*.sendgrid.net → SendGrid
@*.mailgun.org                → Mailgun
Other domains                  → Custom SMTP (ask for server, port, username, password)

Provider-Specific Credential Requirements

Gmail (@gmail.com, @googlemail.com)

  • Password Type: App Password (NOT account password)
  • Prerequisite: Two-factor authentication (2FA) must be enabled
  • How to get App Password:

1. Go to https://myaccount.google.com/apppasswords 2. Sign in to your Google Account 3. Select "Mail" and "Other (Custom name)" → Enter a name like "SMTP Script" 4. Click "Generate" → Copy the 16-character password

  • SMTP Server: smtp.gmail.com
  • Port: 587 (TLS) or 465 (SSL)
  • Username: Your full Gmail address

Outlook / Office 365 (@outlook.com, @hotmail.com, @live.com, @office365.com)

  • Password Type: Account password (same as web login)
  • SMTP Server: smtp.office365.com
  • Port: 587 (TLS)
  • Username: Your full Outlook/Office 365 email address

QQ Mail (@qq.com, @vip.qq.com)

  • Password Type: SMTP Authorization Code (NOT account password)
  • How to get Authorization Code:

1. Login to QQ Mail at https://mail.qq.com 2. Click "Settings" (设置) → "Account" (账户) 3. Find "POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV Service" 4. Open "POP3/SMTP Service" or "IMAP/SMTP Service" 5. Click "Generate Authorization Code" (生成授权码) 6. Verify identity via SMS → Copy the generated code

  • SMTP Server: smtp.qq.com
  • Port: 587 (TLS) or 465 (SSL)
  • Username: Your full QQ email address

NetEase 163 Mail (@163.com)

  • Password Type: SMTP Authorization Code (NOT account password)
  • How to get Authorization Code:

1. Login to 163 Mail at https://mail.163.com 2. Click "Settings" (设置) → "POP3/SMTP/IMAP" 3. Click "Open" next to "IMAP/SMTP Service" 4. Verify identity → Click "Get Authorization Code" (获取授权码) 5. Copy the 16-character authorization code

  • SMTP Server: smtp.163.com
  • Port: 465 (SSL) or 994 (IMAP)
  • Username: Your full 163 email address

NetEase 126 Mail (@126.com)

  • Password Type: SMTP Authorization Code (NOT account password)
  • How to get Authorization Code:

1. Login to 126 Mail at https://mail.126.com 2. Click "Settings" (设置) → "POP3/SMTP/IMAP" 3. Enable "IMAP/SMTP Service" 4. Copy the authorization password displayed

  • SMTP Server: smtp.126.com
  • Port: 465 (SSL) or 25 (SSL)
  • Username: Your full 126 email address

SendGrid

  • Password Type: API Key (as password)
  • How to get API Key:

1. Login to SendGrid at https://app.sendgrid.com 2. Go to Settings → API Keys 3. Click "Create API Key" 4. Set permissions → Click "Create & View" 5. Copy the API key (only shown once)

  • SMTP Server: smtp.sendgrid.net
  • Port: 587 (TLS) or 465 (SSL)
  • Username: apikey (literally this string)

Mailgun

  • Password Type: SMTP credentials from dashboard
  • How to get Credentials:

1. Login to Mailgun at https://app.mailgun.com 2. Go to Sending → Domains 3. Select your domain 4. Copy SMTP username and password from the page

  • SMTP Server: smtp.mailgun.org
  • Port: 587 (TLS)
  • Username: From Mailgun dashboard

Custom SMTP (Other domains) Ask the user to provide:

  • SMTP Server Address
  • SMTP Port
  • Username
  • Password

Step 3: Auto-detect and Handle Markdown Content

The script automatically detects if the email content is in Markdown format by looking for common patterns:

  • Headers (#, ##, ###)
  • Bold/italic text (**bold**, *italic*)
  • Lists (- item or 1. item)
  • Code blocks (```)
  • Links ([text](url))

If Markdown is detected, the content is automatically converted to beautifully styled HTML with:

  • Professional typography and spacing
  • Color-coded headers
  • Styled tables and code blocks
  • Responsive design for email clients

You don't need to manually specify --content-type html for Markdown content - it's handled automatically!

Step 4: Collect Optional Information (if needed)

  • --from-name: Display name for sender (e.g., "John Doe")
  • --content-type html: For HTML formatted emails (defaults to plain text, but auto-converts Markdown)
  • --attach: File path(s) to attach (can specify multiple)
  • --template: Use template file instead of content
  • --template-vars: JSON string of template variables

Step 5: Confirm and Send

Before sending, confirm with the user:

Ready to send:
From: [Sender Email]
To: [Recipient Email]
Subject: [Subject]
Content Type: [Plain/HTML]
Attachments: [List of attachments or None]

Proceed to send? (y/n)

If confirmed, execute the send_email.py script with all collected parameters.

Example Conversations

Example 1: Basic Gmail Email

User: Send an email to john@example.com with subject "Hello"

Skill: I can help you send that email. I need a few more details:

  1. Content: What should the email body contain?
  2. Sender Email: What email address should I send from?

User: The content is "Hi John, just saying hello!" and send from myemail@gmail.com

Skill: I detected you're using Gmail. For Gmail, you need an App Password (not your regular password).

To get your App Password:

  1. Go to https://myaccount.google.com/apppasswords
  2. Sign in and create an App Password for "Mail"
  3. Copy the 16-character password

Please provide your Gmail App Password:

User: abcd efgh ijkl mnop

Skill: Ready to send:

  • From: myemail@gmail.com
  • To: john@example.com
  • Subject: Hello
  • Content: Hi John, just saying hello!

Proceed to send? (y/n)


Example 2: Markdown Content with Default Sender

User: 发一封邮件给 manager@company.com,主题是"AR眼镜行业分析",内容是 [用户提供的 Markdown 报告]

Skill: 我来帮您发送这封邮件。检测到您没有指定发件人邮箱,我将使用默认邮箱 agent_skill_test@126.com 发送。

同时,我发现您的内容是 Markdown 格式,将自动转换为美观的 HTML 格式,让报告更易读。

为了使用 126 邮箱发送,我需要您提供 SMTP 授权码

获取授权码步骤:

  1. 登录 126 邮箱 → 设置 → POP3/SMTP/IMAP
  2. 启用 "IMAP/SMTP 服务"
  3. 复制显示的授权密码

请提供 agent_skill_test@126.com 的授权码:

User: [提供授权码]

Skill: 准备发送邮件:

  • 发件人: agent_skill_test@126.com
  • 收件人: manager@company.com
  • 主题: AR眼镜行业分析
  • 格式: Markdown → HTML (自动转换)
  • 内容预览: 包含标题、列表、表格等格式化内容

确认发送? (y/n)


Example 3: Default Sender with Missing Content

User: 发邮件给 user@company.com,主题是项目报告

Skill: 我需要收集邮件内容:

邮件正文是什么?

User: 项目已完成,所有里程碑都已达成。

Skill: 我将使用默认邮箱 agent_skill_test@126.com 发送。

为了使用 126 邮箱发送,我需要您提供 SMTP 授权码

获取授权码步骤:

  1. 登录 126 邮箱 → 设置 → POP3/SMTP/IMAP
  2. 启用 "IMAP/SMTP 服务"
  3. 复制显示的授权密码

请提供 agent_skill_test@126.com 的授权码:

User: [提供授权码]

Skill: 准备发送邮件:

  • 发件人: agent_skill_test@126.com
  • 收件人: user@company.com
  • 主题: 项目报告
  • 内容: 项目已完成,所有里程碑都已达成。

确认发送?(y/n)


Example 4: User Specifies Custom Sender Email

User: Send a report to boss@company.com from myname@outlook.com about Q4 results, with attachment /home/user/q4_report.pdf

Skill: I'll help you send that email. Please provide the email content:

What should the email say about the Q4 results?

User: Please find attached the Q4 financial report. Let me know if you have any questions.

Skill: I see you're using Outlook. You'll need your Outlook account password (same as web login).

Please provide your Outlook password:

User: mypassword123

Skill: Ready to send:

  • From: myname@outlook.com
  • To: boss@company.com
  • Subject: Q4 results
  • Content: Please find attached the Q4 financial report. Let me know if you have any questions.
  • Attachment: /home/user/q4_report.pdf

Proceed to send? (y/n)


Example 5: Custom SMTP

User: Send email to test@domain.com from my@domain.com

Skill: I need to gather some information:

  1. Subject: What is the email subject?
  2. Content: What is the email body?

User: Subject is Test Email, content is Hello World

Skill: Since you're using a custom domain (my@domain.com), I'll need your SMTP configuration:

  1. SMTP Server: What is your SMTP server address?
  2. SMTP Port: What port should I use?
  3. Username: What is your SMTP username?
  4. Password: What is your SMTP password?

User: Server is smtp.mydomain.com, port 587, username is my@domain.com, password is secret

Skill: Ready to send:

  • From: my@domain.com
  • To: test@domain.com
  • Subject: Test Email
  • Content: Hello World
  • SMTP Server: smtp.mydomain.com:587

Proceed to send? (y/n)

Script Command Reference

Once all information is collected, execute the script with appropriate parameters:

Basic Command

python3 scripts/send_email.py \
  --to recipient@example.com \
  --subject "Email Subject" \
  --content "Email body content" \
  --smtp-server smtp.gmail.com \
  --smtp-port 587 \
  --username your@email.com \
  --password your-password-or-app-password

HTML Email

python3 scripts/send_email.py \
  --to recipient@example.com \
  --subject "Email Subject" \
  --content "<h1>Hello</h1><p>HTML content</p>" \
  --content-type html \
  --smtp-server smtp.gmail.com \
  --smtp-port 587 \
  --username your@email.com \
  --password your-password

Email with Attachments

python3 scripts/send_email.py \
  --to recipient@example.com \
  --subject "Email Subject" \
  --content "Email body" \
  --attach /path/to/file1.pdf \
  --attach /path/to/file2.csv \
  --smtp-server smtp.gmail.com \
  --smtp-port 587 \
  --username your@email.com \
  --password your-password

Email with Template

python3 scripts/send_email.py \
  --to recipient@example.com \
  --subject "Email Subject" \
  --template assets/simple-notification.html \
  --template-vars '{"title":"Notification","message":"Your report is ready!"}' \
  --content-type html \
  --smtp-server smtp.gmail.com \
  --smtp-port 587 \
  --username your@email.com \
  --password your-password

SSL Connection (instead of TLS)

python3 scripts/send_email.py \
  --to recipient@example.com \
  --subject "Email Subject" \
  --content "Email body" \
  --smtp-server smtp.gmail.com \
  --smtp-port 465 \
  --use-ssl \
  --username your@email.com \
  --password your-password

SMTP Server Configuration Reference

ProviderSMTP ServerPortEncryptionPassword TypeUsername
Gmailsmtp.gmail.com587TLSApp PasswordFull email
Gmailsmtp.gmail.com465SSLApp PasswordFull email
Outlooksmtp.office365.com587TLSAccount PasswordFull email
QQ Mailsmtp.qq.com587TLSAuthorization CodeFull email
QQ Mailsmtp.qq.com465SSLAuthorization CodeFull email
163 Mailsmtp.163.com465SSLAuthorization CodeFull email
163 Mailsmtp.163.com994SSLAuthorization CodeFull email
126 Mailsmtp.126.com465SSLAuthorization CodeFull email
126 Mailsmtp.126.com25SSLAuthorization CodeFull email
SendGridsmtp.sendgrid.net587TLSAPI Keyapikey
SendGridsmtp.sendgrid.net465SSLAPI Keyapikey
Mailgunsmtp.mailgun.org587TLSSMTP PasswordFrom dashboard

Installation

Before using this skill, install the required Python dependencies:

pip install -r requirements.txt

This installs the markdown library (version ≥3.4.0) which is required for automatic Markdown to HTML conversion.

Resources

scripts/send_email.py

Main Python script for sending emails. Supports:

  • Plain text and HTML content
  • Multiple file attachments
  • Email templates with variable substitution
  • TLS and SSL encryption
  • Custom sender names

references/smtp-servers.md

Common SMTP server configurations including Gmail, Outlook, 126, QQ, 163, SendGrid, Mailgun, and Aliyun.

assets/

Email templates:

  • simple-notification.html - Basic notification template
  • report-summary.html - Professional report template with metrics grid

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

80.06%
按下载量换算6,925

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills