返回顶部
e

email-reporter邮件报告工具

Generic email reporting tool for OpenClaw agents. Auto-converts Markdown to PDF and sends as attachments.

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

email-reporter

邮件报告技能

概述

面向OpenClaw代理的统一邮件报告工具。检测到图片时自动将Markdown报告转换为PDF,并以附件形式发送。

功能特性

  • - 智能格式检测:包含图片或大文件(>500KB)时自动转换为PDF
  • Markdown支持:原生Markdown渲染,支持语法高亮
  • 灵活配置:支持环境变量或配置文件设置邮件参数
  • 多后端支持:兼容msmtp、SMTP和sendmail

安装

bash
clawhub install email-reporter

配置

方式一:环境变量(推荐)

bash
export EMAIL_SENDER=your-email@qq.com
export EMAIL_RECIPIENT=recipient@example.com
export EMAILSMTPHOST=smtp.qq.com
export EMAILSMTPPORT=587
export EMAILSMTPUSER=your-email@qq.com
export EMAILSMTPPASS=your-auth-code

方式二:配置文件

创建 ~/.email_reporter.conf:

json
{
sender: your-email@qq.com,
recipient: recipient@example.com,
smtp_host: smtp.qq.com,
smtp_port: 587,
smtp_user: your-email@qq.com,
smtp_pass: your-auth-code,
use_msmtp: false
}

方式三:命令行参数

bash
python3 email_reporter.py report.md --sender me@qq.com --to friend@example.com

使用方法

基本用法

bash

发送报告至默认收件人


python3 email_reporter.py report.md

指定代理名称(用于邮件主题)

python3 email_reporter.py report.md --agent my-agent

自定义收件人

python3 email_reporter.py report.md --to friend@example.com

自定义主题

python3 email_reporter.py report.md --subject 我的分析报告

在代理中使用

python
import subprocess

发送报告

subprocess.run([ python3, skills/email-reporter/email_reporter.py, reports/analysis.md, --agent, invest-agent, --to, recipient@example.com ])

文件格式选择

场景格式发送方式
纯文本(<100KB)Markdown直接发送
包含图片或>500KB
PDF | 附件发送 | | 数据表格 | Markdown + CSV | 附件打包 |

SMTP设置指南

QQ邮箱

  1. 1. 开启SMTP:设置 → 账户 → 开启SMTP服务
  2. 生成授权码(非登录密码)
  3. 将授权码设为 EMAILSMTPPASS

Gmail

  1. 1. 开启两步验证
  2. 生成应用专用密码
  3. 将应用密码设为 EMAILSMTPPASS

Outlook/Office 365

bash export EMAILSMTPHOST=smtp.office365.com export EMAILSMTPPORT=587

故障排除

邮件发送失败

bash

测试SMTP连接

python3 -c import smtplib s = smtplib.SMTP(smtp.qq.com, 587) s.starttls() s.login(your-email@qq.com, your-auth-code) print(登录成功)

PDF转换失败

bash

安装依赖

pip install markdown weasyprint

Linux系统(Ubuntu/Debian)

sudo apt-get install libpango-1.0-0 libpangoft2-1.0-0

许可证

MIT

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 email-reporter-1776165430 技能

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

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

通过命令行安装

skillhub install email-reporter-1776165430

下载

⬇ 下载 email-reporter v1.0.0(免费)

文件大小: 9.46 KB | 发布时间: 2026-4-15 11:55

v1.0.0 最新 2026-4-15 11:55
**Major update: email-reporter 2.0.0 adds advanced formatting and configuration options.**

- Automatically converts Markdown reports with images or large files (>500KB) to PDF and sends as attachments
- Supports native Markdown rendering, syntax highlighting, and data tables (CSV attachment)
- Flexible configuration via environment variables, config file, or command line
- Multiple backend options: msmtp, SMTP, and sendmail
- Improved SMTP setup and troubleshooting instructions

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

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

p2p_official_large
返回顶部