返回顶部
e

email邮件管理

Email management and automation. Send, read, search, and organize emails across multiple providers.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
610
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

email

电子邮件 📧

支持附件的电子邮件管理与自动化功能。

功能特性

  • - 发送带附件的电子邮件
  • 支持多种邮件服务商(Gmail、Outlook、Yahoo等)
  • 支持HTML和纯文本格式邮件
  • 支持抄送和密送收件人
  • 测试邮件功能
  • 安全的TLS/SSL连接

配置说明

1. 配置邮件凭证

在工作目录下创建配置文件 email_config.json:

json
{
smtp_server: smtp.gmail.com,
smtp_port: 587,
username: your-email@gmail.com,
password: your-app-password,
sender_name: OpenClaw Assistant,
use_tls: true,
use_ssl: false
}

2. Gmail用户配置(推荐)

  1. 1. 在Google账户中启用两步验证
  2. 生成应用专用密码:
- 访问 https://myaccount.google.com/security - 在登录Google部分选择应用密码 - 为邮件生成新的应用密码 - 在配置中使用这个16位密码

3. 替代方案:环境变量

使用环境变量替代配置文件:

bash

Windows系统


set SMTP_SERVER=smtp.gmail.com
set SMTP_PORT=587
set EMAIL_USERNAME=your-email@gmail.com
set EMAIL_PASSWORD=your-app-password
set EMAILSENDERNAME=OpenClaw Assistant

macOS/Linux系统

export SMTP_SERVER=smtp.gmail.com export SMTP_PORT=587 export EMAIL_USERNAME=your-email@gmail.com export EMAIL_PASSWORD=your-app-password export EMAILSENDERNAME=OpenClaw Assistant

使用示例

发送简单邮件

bash python email_sender.py --to recipient@example.com --subject 你好 --body 这是一封测试邮件

发送带附件的邮件

bash python email_sender.py --to recipient@example.com --subject 报告 --body 请查收附件 --attachment report.pdf --attachment data.xlsx

发送测试邮件

bash python email_sender.py --to your-email@gmail.com --test

配合OpenClaw命令使用

发送邮件至 recipient@example.com,主题为会议纪要,内容为这是今天会议的记录
发送测试邮件以验证配置
将 report.pdf 文件通过邮件发送至 team@company.com

支持的邮件服务商

服务商SMTP服务器端口TLS
Gmailsmtp.gmail.com587
Outlook/Office365
smtp.office365.com | 587 | 是 | | Yahoo | smtp.mail.yahoo.com | 587 | 是 | | QQ邮箱 | smtp.qq.com | 587 | 是 | | 自定义SMTP | your.smtp.server.com | 587/465 | 按配置 |

Python API使用

python
from email_sender import EmailSender

使用配置文件初始化

sender = EmailSender(email_config.json)

发送带附件的邮件

result = sender.send_email( to_email=recipient@example.com, subject=重要文件, body=请审阅附件中的文件。, attachments=[document.pdf, data.csv] )

if result[success]:
print(f邮件已发送,包含 {result[attachments]} 个附件)
else:
print(f错误:{result[error]})

故障排除

常见问题:

  1. 1. 认证失败
- 验证用户名和密码是否正确 - Gmail用户:使用应用密码而非常规密码 - 检查是否已启用两步验证
  1. 2. 连接被拒绝
- 验证SMTP服务器和端口是否正确 - 检查防火墙设置 - 尝试其他端口(SSL使用465端口)
  1. 3. 附件过大
- 大多数服务商限制附件大小为25MB - 考虑压缩文件或使用云存储链接

安全注意事项

  • - 切勿将邮件凭证提交到版本控制系统
  • 生产环境部署时使用环境变量
  • 定期轮换应用密码
  • 建议使用专用邮箱账户进行自动化操作

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 email-skill-1775946093 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 email-skill-1775946093 技能

通过命令行安装

skillhub install email-skill-1775946093

下载

⬇ 下载 email v0.1.0(免费)

文件大小: 10.16 KB | 发布时间: 2026-4-12 09:50

v0.1.0 最新 2026-4-12 09:50
Initial release of the email skill for management and automation.

- Send emails with attachments across multiple providers (Gmail, Outlook, Yahoo, QQ Mail, and custom SMTP)
- Supports HTML/Plain text, CC, BCC, and secure TLS/SSL connections
- Configurable via JSON file or environment variables
- Python API and command-line usage included
- Troubleshooting and security best practices documented

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部