139mail logo

139mail

Community
modbender
139mail

139邮箱IMAP/POP3操作技能。支持通过IMAP/POP3协议查看收件箱/未读邮件、发送邮件、搜索邮件、管理邮件、邮件分拣。首次使用需配置账号和授权码。当用户需要操作139邮箱(mail.10086.cn)时触发此技能。

Overview

Publishermodbender
Repositoryskill-library-mcp
Skill name139mail
Stars
21
Forks
6
Bundled files
11
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 11 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by modbender on GitHub. Read the source before you install it.

Installation

Install the 139mail AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/modbender/skill-library-mcp/tree/main/data/139mail
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/modbender/skill-library-mcp.git /tmp/skill-library-mcp
mkdir -p .claude/skills
cp -r /tmp/skill-library-mcp/data/139mail .claude/skills/139mail
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable 139mail in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads 139mail on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so 139mail is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

139邮箱IMAP/POP3操作技能

概述

本技能通过IMAP/POP3协议直接连接139邮箱服务器,实现高效的邮件管理功能。

重要:首次使用需配置账号和授权码

安装依赖

本技能需要安装第三方依赖库:

bash
pip install imapclient

依赖说明:

  • imapclient:用于IMAP协议连接139邮箱服务器
  • 标准库:smtplib, email, json, argparse(Python内置)

SSL/TLS 安全说明

由于139邮箱服务器使用的是较旧版本的TLS协议(TLS 1.0/1.1),本技能使用兼容模式连接。 安全建议:

  • 兼容模式会降低SSL安全性,建议仅在受信任的网络环境中使用

首次使用流程

当用户首次请求操作139邮箱时:

第1步:环境检查(推荐)

运行环境检查脚本,确保所有依赖就绪:

bash
python scripts/check_env.py

此脚本会检查:

  • Python版本 >= 3.8
  • OpenSSL版本 >= 1.1.1
  • imapclient模块已安装
  • SSL兼容性设置
  • 配置文件是否存在

第2步:安装依赖

bash
pip install imapclient

第3步:开启IMAP服务并获取授权码

  1. 前往 https://mail.10086.cn/ 登录邮箱
  2. 进入 设置 → 账户 → IMAP/POP3服务
  3. 开启 IMAP/SMTP服务
  4. 获取授权码(16位字符串,不是登录密码!)

⚠️ 重要:授权码只显示一次,请务必保存!

第4步:保存配置

bash
python scripts/config_manager.py save --username 136xxxxxxxxx@139.com --password 你的授权码

第5步:测试连接

bash
python scripts/check_mail.py --limit 5

如果显示邮件列表,说明配置成功!

快速开始(一步完成)

bash
# 1. 安装依赖
pip install imapclient

# 2. 运行环境检查
python scripts/check_env.py

# 3. 配置账号(替换为你的账号和授权码)
python scripts/config_manager.py save --username 136xxxxxxxxx@139.com --password xxxxxxxxxxxxxxxx

# 4. 查看邮件
python scripts/check_mail.py --unread

配置管理

脚本:scripts/config_manager.py

命令:

  • python scripts/config_manager.py check - 检查是否已配置
  • python scripts/config_manager.py save --username <账号> --password <授权码> - 保存配置
  • python scripts/config_manager.py show - 显示当前配置(隐藏授权码)

配置文件:config/139mail.conf

配置文件格式(JSON):

json
{
  "username": "136xxxxxxxxx@139.com",
  "password": "授权码",
  "imap_server": "imap.139.com",
  "imap_port": 993,
  "smtp_server": "smtp.139.com",
  "smtp_port": 465
}

项目结构

skills/139mail/
├── SKILL.md                    # 本文件 - 使用文档
├── config/                     # 配置目录
│   └── 139mail.conf           # 账号配置文件(自动创建)
├── references/                 # 参考资料
│   ├── credentials.md         # 服务器配置信息
│   └── imap_guide.md          # IMAP操作指南
└── scripts/                    # 核心脚本
    ├── check_env.py           # ⭐ 环境检查脚本(新手先用)
    ├── config_manager.py      # 配置管理
    ├── check_mail.py          # 查看邮件
    ├── view_mail.py           # 查看邮件详情
    ├── send_mail.py           # 发送邮件
    ├── search_mail.py         # 搜索邮件
    ├── manage_mail.py         # 邮件管理(标记/删除)
    └── move_mail.py           # 邮件分拣

核心功能

1. 查看收件箱/未读邮件

触发场景:"查看139邮箱"、"有没有新邮件"

流程:

  1. 检查配置是否存在(config_manager.py check)
  2. 如无配置,执行首次使用流程
  3. 调用 scripts/check_mail.py --unread

命令示例:

bash
python scripts/check_mail.py --limit 10
python scripts/check_mail.py --unread

2. 查看指定邮件详情

脚本:scripts/view_mail.py <邮件ID>

示例:

bash
python scripts/view_mail.py 123

3. 发送邮件

脚本:scripts/send_mail.py <收件人> <主题> <正文>

示例:

bash
python scripts/send_mail.py "recipient@example.com" "主题" "正文内容"

4. 搜索邮件

脚本:scripts/search_mail.py <关键词>

示例:

bash
python scripts/search_mail.py "工作汇报"

5. 管理邮件

脚本:scripts/manage_mail.py

常用命令:

bash
# 列出邮件
python scripts/manage_mail.py --list

# 列出已删除邮件
python scripts/manage_mail.py --list-trash

# 标记已读/未读
python scripts/manage_mail.py --mark-read <ID>
python scripts/manage_mail.py --mark-unread <ID>

# 删除邮件(移动到已删除文件夹)
python scripts/manage_mail.py --delete <ID>

# 恢复邮件(从已删除文件夹恢复)
python scripts/manage_mail.py --restore <ID>

# 彻底删除(永久删除,不可恢复)
python scripts/manage_mail.py --permanent-delete <ID>

6. 邮件分拣

脚本:scripts/move_mail.py

示例:

bash
# 列出所有文件夹
python scripts/move_mail.py --list-folders

# 移动邮件
python scripts/move_mail.py --move <邮件ID> --to <目标文件夹>

错误处理与故障排除

常见错误及解决方案

1. SSL握手失败

错误信息:

[SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure

原因:

  • 139邮箱使用较旧的TLS 1.0/1.1协议
  • Python 3.10+ 默认OpenSSL安全级别过高

解决方案: 本技能已自动配置兼容性设置,无需手动修改。如仍失败:

bash
# 检查Python版本
python --version  # 需要 >= 3.8

# 检查OpenSSL版本
python -c "import ssl; print(ssl.OPENSSL_VERSION)"  # 需要 >= 1.1.1
2. 登录失败

错误信息:

imapclient.exceptions.LoginError

检查清单:

  • 账号格式正确:136xxxxxxxxx@139.com(不是纯手机号)
  • 使用的是授权码,不是登录密码
  • 已在网页版开启 IMAP 服务
  • 授权码未过期(如过期需重新获取)
3. 找不到模块

错误信息:

ModuleNotFoundError: No module named 'imapclient'

解决:

bash
pip install imapclient
4. 中文显示乱码

现象:邮件主题/发件人显示为乱码

原因:Windows终端编码问题

解决:

  • 使用 VS Code 终端(推荐)
  • 或设置 Windows 使用 UTF-8:
    cmd
    chcp 65001

调试模式

如需详细调试信息,可在运行脚本前设置环境变量:

bash
set PYTHONHTTPSVERIFY=0
python scripts/check_mail.py --limit 5

首次使用提示模板

当检测到用户未配置时,使用以下提示:

首次使用139邮箱功能,需要您先完成以下设置:

1. 安装依赖:
   pip install imapclient

2. 登录 https://mail.10086.cn/
3. 进入 设置 → 账户 → IMAP/POP3服务
4. 开启 IMAP/POP3 服务
5. 获取授权码(不是登录密码!)

请提供:
- 139邮箱账号(如 136xxxxxxxxx@139.com)
- 授权码:______

安全说明

  1. 配置文件权限:配置文件 config/139mail.conf 保存时设置权限为 600(仅所有者可读写)
  2. SSL/TLS:使用兼容模式连接139邮箱。由于139邮箱使用较旧TLS协议,此模式会降低SSL安全性,建议仅在受信任的网络环境中使用。
  3. 授权码保护:授权码仅保存在本地配置文件,不会上传到任何外部服务器。
  4. 使用完成后:如不再使用,建议删除配置文件并撤销邮箱授权码。

参考文档

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the 139mail AI skill do?

139邮箱IMAP/POP3操作技能。支持通过IMAP/POP3协议查看收件箱/未读邮件、发送邮件、搜索邮件、管理邮件、邮件分拣。首次使用需配置账号和授权码。当用户需要操作139邮箱(mail.10086.cn)时触发此技能。

Why use 139mail on TypingMind?

Because you install it once and use it with any model. 139mail is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install 139mail in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/modbender/skill-library-mcp/tree/main/data/139mail. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use 139mail?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with 139mail?

As many as you like. As long as a model supports skills, you can use 139mail with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the 139mail AI skill free?

Yes. It is published on GitHub by modbender under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇