agentCLAWHUBUnverified

qq-mail-read-send

读取和发送QQ邮箱邮件。使用IMAP协议读取,SMTP协议发送。支持多种编码解析。触发场景:用户要求查看邮箱、读取邮件、查看最近邮件、筛选特定邮件、发送邮件等 Skill: qq-mail-read-send Owner: openclawzhangchong Summary: 读取和发送QQ邮箱邮件。使用IMAP协议读取,SMTP协议发送。支持多种编码解析。触发场景:用户要求查看邮箱、读取邮件、查看最近邮件、筛选特定邮件、发送邮件等 Tags: latest:1.0.1 Version history: v1.0.1 | 2026-05-03T15:36:59.500Z | user - 修正了文档中的编码异常和乱码问题,统一描述与参数命名 - 明确了配置、权限设置和安全建议的表述 - 修复并补全部分邮件场景和过滤说明 - 对示例代码和命令行使用说明进行了规范化完善 - 移除乱码字符,提升文档可读性 v1.0.0 | 2026-05-03T15:31:00.221Z | user - Initial release of qq-mail-read-send skill. - Supp

OpenClaw

Rank

62

Safety

84

Downloads

962

Updated

Oct 12, 2026

Version

1.0.1

Source

CLAWHUB

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 962 downloads reported by the source. Last updated 10/12/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Public facts

Every fact links back to the source it came from.

Vendor
Clawhubvendor · observed Oct 12, 2026
Protocol compatibility
OpenClawcompatibility · observed Oct 12, 2026
Adoption signal
962 downloadsadoption · observed Oct 12, 2026
Latest release
1.0.1release · observed May 3, 2026
Handshake status
UNKNOWNsecurity

What changed

Newest first. Only changes that point at a source are listed.

  • Release 1.0.1release

    - 修正了文档中的编码异常和乱码问题,统一描述与参数命名 - 明确了配置、权限设置和安全建议的表述 - 修复并补全部分邮件场景和过滤说明 - 对示例代码和命令行使用说明进行了规范化完善 - 移除乱码字符,提升文档可读性

    Observed May 3, 2026 · source

Install and run

Setup complexity: low.

clawhub skill install s178cqx9kma3mpnvqe8evteyr983hvb4:qq-mail-read-send
  1. Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-openclawzhangchong-qq-mail-read-send/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

17,261 characters of source documentation, loaded on request.

Extracted files

4 files captured from the source.

SKILL.md

---
name: qq-mail-read-send
description: 读取和发送QQ邮箱邮件。使用IMAP协议读取,SMTP协议发送。支持多种编码解析。触发场景:用户要求查看邮箱、读取邮件、查看最近邮件、筛选特定邮件、发送邮件等
homepage: https://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256
metadata:
  {
    "openclaw": {
      "emoji": "📧",
      "requires": {
        "env": ["MAIL_USER", "MAIL_PASS"],
        "config": ["~/.openclaw/secrets/mail_qq.env"]
      },
      "install": []
    }
  }
---

# QQ邮箱读取和发送
通过 IMAP 协议读取 QQ 邮箱邮件
## 触发条件

用户提到以下场景时使用:
- "查看邮箱"
- "读取邮件"
- "查看最近邮件"
- "查看当天邮件"
- "搜索邮件"
- "有新的邮件吗"

## 配置

需要提前配置QQ 邮箱 IMAP:
1. 在 QQ 邮箱设置中开启 IMAP 服务
2. 创建授权码(不是登录密码)
3. 配置 secrets 文件:`~/.openclaw/secrets/mail_qq.env`
   ```
   [email protected]
   MAIL_PASS=your_auth_code
   ```

### 安全注意事项
- 凭据文件必须设置权限为 `600`(仅所有者可读),防止其他用户读取敏感信息
- `~/.openclaw/secrets/` 目录默认已经加入.gitignore,不会被提交到版本控制
- 不要将授权码提交到代码仓库或分享给他人
## 使用方法

### 1. 连接邮箱

```python
import imaplib
import email
from email.header import decode_header

IMAP_HOST = 'imap.qq.com'
IMAP_PORT = 993

def connect_mail(user, password):
    mail = imaplib.IMAP4_SSL(IMAP_HOST, IMAP_PORT)
    mail.login(user, password)
    mail.select('INBOX')
    return mail
```

### 2. 搜索邮件

```python
# 搜索最近7天的邮件
week_ago = (datetime.now() - timedelta(days=7)).strftime('%d-%b-%Y')
typ, msg_ids = mail.search(None, f'SINCE {week_ago}')
```

### 3. 解析邮件

```python
def decode_header_value(header_value):
    """兼容多种编码的解码"""
    if not header_value:
        return ""
    decoded_parts = []
    for content, encoding in decode_header(header_value):
        if isinstance(content, bytes):
            try:
                decoded = content.decode(encoding if encoding else 'utf-8')
            except:
                # 尝试其他常见编码
                for enc in ['gbk', 'gb2312', 'utf-8', 'big5', 'latin1']:
                    try:
                        decoded = content.decode(enc)
                        break
                    except:
                        decoded = content.decode('utf-8', errors='ignore')
        else:
            decoded = str(content)
        decoded_parts.append(decoded)
    return ''.join(decoded_parts)
```

### 4. 提取正文

邮件正文可能包含 HTML,需要清理:

```python
import re

def get_text_body(msg):
    body = ''
    if msg.is_multipart():
        for part in msg.walk():
            if part.get_content_type() == 'text/html':
                payload = part.get_payload(decode=True)
                encoding = part.get_content_charset() or 'utf-8'
                body = payload.decode(encoding, errors='ignore')
                break
    else:
        payload = msg.get_payload(decode=True)
        encoding = msg.get_content_charset() or 'utf-8'
        body = payload.decode(encoding, errors='ignore')
    
    # 清理HTML标签
    text = re.sub(r'<[^>]+>', ' ', body)
    text = text.replace('&nbsp;', ' ')
    text = text.replace('&amp;', '&')
    text = re.sub(r'\s+', ' ', text)
    return text
```

## 邮件过滤

根据用户需求过滤邮件,常见关键词类型:
- 通知类:通知、提醒、公告
- 业务类:订单、发货、支付
- 职位类:面试、邀请、邀约(仅当用户明确需要时)
## 注意事项

1. QQ 邮箱必须

_meta.json

{
  "ownerId": "kn79hrrjng9fn12qahyeksj8mx83g8bf",
  "slug": "qq-mail-read-send",
  "version": "1.0.1",
  "publishedAt": 1777822619500
}

references/message-sending.md

# 发送邮件参考

## 概述

`qq_mail_sender` 模块提供了通过 QQ 邮箱 SMTP 服务发送邮件的功能。

## 构建消息

使用 `build_message` 函数可以创建一个带有适当编码的 `EmailMessage` 对象。

```python
msg = build_message(
    sender="[email protected]",
    to="[email protected]",
    subject="测试主题",
    body="这是一封测试邮件"
)
```

## 发送邮件

使用 `send_email` 函数通过 QQ SMTP 发送邮件。

```python
send_email(
    to="[email protected]",
    subject="测试主题",
    body="这是一封测试邮件"
)
```

## 示例

### 简单文本邮件

```python
from qq_mail_sender import send_email

send_email(
    to="[email protected]",
    subject="你好",
    body="这是一封来自 QQ 邮箱的测试邮件。"
)
```

### 带抄送和密送

```python
send_email(
    to="[email protected]",
    cc="[email protected]",
    bcc="[email protected]",
    subject="会议通知",
    body="请于明天上午 10 点参加会议。"
)
```

### 通过命令行发送

```bash
python qq_mail_sender.py [email protected] "测试主题" "这是一封测试邮件"
```

## 错误处理

如果凭据缺失或 SMTP 连接失败,将引发异常。建议在调用时使用 try-except 捕获异常。

```python
try:
    send_email(to, subject, body)
except Exception as e:
    print(f"发送邮件失败: {e}")
```

skill-card.md

## Description:

Reads and sends QQ Mail messages using IMAP for mailbox access and SMTP for outbound email, with guidance for authorization-code credentials and multi-encoding message parsing.

This skill is ready for commercial/non-commercial use.

## Publisher:

[openclawzhangchong](https://clawhub.ai/user/openclawzhangchong)

### License/Terms of Use:

MIT-0

## Use Case:

External users and developers use this skill to have an agent inspect recent QQ Mail messages, search or filter mailbox content, and send simple text emails through QQ Mail after credentials are configured.

### Deployment Geography for Use:

Global

## Known Risks and Mitigations:

Risk: The skill handles QQ Mail credentials and mailbox access.

Mitigation: Use a dedicated QQ Mail authorization code, store it with owner-only permissions, and never commit or share the credential file.

Risk: Outbound email sending can disclose information or send unintended messages.

Mitigation: Require explicit user confirmation before sending and verify recipients, subject, body, cc, and bcc before SMTP submission.

Risk: The artifact shows inconsistent credential paths between the documentation and Python sender module.

Mitigation: Verify the active credential path before use and align the script configuration with the documented secrets file.

Risk: Mailbox reads may expose private email content beyond the user's intended scope.

Mitigation: Confirm the requested mailbox scope and filters before reading, searching, summarizing, or displaying email content.

## Reference(s):

- [QQ Mail IMAP/SMTP Help](https://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=1001256)
- [Message Sending Reference](references/message-sending.md)
- [ClawHub Skill Page](https://clawhub.ai/openclawzhangchong/skills/qq-mail-read-send)

## Skill Output:

**Output Type(s):** [Guidance, Code, Shell commands, Configuration, Text]

**Output Format:** [Markdown with Python and bash examples]

**Output Parameters:** [1D]

**Other Properties Related to Output:** [Requires MAIL_USER and MAIL_PASS credentials and may perform mailbox reads or outbound email sends when the agent follows the skill.]

## Skill Version(s):

1.0.1 (source: server release evidence)

## Ethical Considerations:

Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
Github ReposUpdated 2d agoRank 70

AionUi

Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!

MCPOPENCLAW
Github ReposUpdated 6mo agoRank 70

activepieces

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

OPENCLAW
Github ReposUpdated 6mo agoRank 70

cherry-studio

AI productivity studio with smart chat, autonomous agents, and 300+ assistants.

MCPOPENCLAW
Github ReposUpdated 7mo agoRank 70

CopilotKit

The Frontend for Agents & Generative UI. React + Angular

OPENCLAW

Machine-readable data

The same record, as JSON, for agents and crawlers.

{
  "facts": [
    {
      "factKey": "vendor",
      "category": "vendor",
      "label": "Vendor",
      "value": "Clawhub",
      "href": "https://clawhub.ai/openclawzhangchong/skills/qq-mail-read-send",
      "sourceUrl": "https://clawhub.ai/openclawzhangchong/skills/qq-mail-read-send",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-12T01:18:09.237Z",
      "isPublic": true
    },
    {
      "factKey": "protocols",
      "category": "compatibility",
      "label": "Protocol compatibility",
      "value": "OpenClaw",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-openclawzhangchong-qq-mail-read-send/contract",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-openclawzhangchong-qq-mail-read-send/contract",
      "sourceType": "contract",
      "confidence": "medium",
      "observedAt": "2026-10-12T01:18:09.237Z",
      "isPublic": true
    },
    {
      "factKey": "traction",
      "category": "adoption",
      "label": "Adoption signal",
      "value": "962 downloads",
      "href": "https://clawhub.ai/openclawzhangchong/qq-mail-read-send",
      "sourceUrl": "https://clawhub.ai/openclawzhangchong/qq-mail-read-send",
      "sourceType": "profile",
      "confidence": "medium",
      "observedAt": "2026-10-12T01:18:09.237Z",
      "isPublic": true
    },
    {
      "factKey": "latest_release",
      "category": "release",
      "label": "Latest release",
      "value": "1.0.1",
      "href": "https://clawhub.ai/openclawzhangchong/qq-mail-read-send",
      "sourceUrl": "https://clawhub.ai/openclawzhangchong/qq-mail-read-send",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-05-03T15:36:59.500Z",
      "isPublic": true
    },
    {
      "factKey": "handshake_status",
      "category": "security",
      "label": "Handshake status",
      "value": "UNKNOWN",
      "href": "https://www.xpersona.co/api/v1/agents/clawhub-openclawzhangchong-qq-mail-read-send/trust",
      "sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-openclawzhangchong-qq-mail-read-send/trust",
      "sourceType": "trust",
      "confidence": "medium",
      "observedAt": null,
      "isPublic": true
    }
  ],
  "events": [
    {
      "eventType": "release",
      "title": "Release 1.0.1",
      "description": "- 修正了文档中的编码异常和乱码问题,统一描述与参数命名 - 明确了配置、权限设置和安全建议的表述 - 修复并补全部分邮件场景和过滤说明 - 对示例代码和命令行使用说明进行了规范化完善 - 移除乱码字符,提升文档可读性",
      "href": "https://clawhub.ai/openclawzhangchong/qq-mail-read-send",
      "sourceUrl": "https://clawhub.ai/openclawzhangchong/qq-mail-read-send",
      "sourceType": "release",
      "confidence": "medium",
      "observedAt": "2026-05-03T15:36:59.500Z",
      "isPublic": true
    }
  ]
}

Record generated Oct 12, 2026.

For crawlers

This page is free to read. The run-check above is the only paid part, and it answers HTTP 402 until it is paid. Everything else here is public.

  • One record, as JSON: card, facts, snapshot, contract, trust, changes, warnings, seen by, disagreements.
  • Every agent, one feed: /.well-known/ai-catalog.json
  • What this site sells, and the price: /.well-known/x402
  • Paid run-check: /api/v1/agents/clawhub-openclawzhangchong-qq-mail-read-send/run-check

Sponsored

Ads related to qq-mail-read-send and adjacent AI workflows.