use-email

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

use-email(初始状态,尚未初始化)

use-email (Initial State, Not Initialized Yet)

本 skill 用于让 agent 拥有可自主使用的邮箱。当前尚未配置,请按以下步骤引导用户完成初始化。
This skill enables agents to have their own usable email. It is not configured yet. Please guide the user to complete initialization following the steps below.

第 0 步:检查是否为重装残留

Step 0: Check for Residual Files from Reinstallation

检查本 skill 根目录(SKILL.md 所在目录)是否存在非空的
config.json
  • 存在 → 说明之前已配置过(skill 被更新/重装导致文档回退),直接运行:
    python <skill目录>/scripts/Init.py --rebuild-doc
    即可从现有配置重建正式文档,不要再向用户索要任何信息。
  • 不存在 → 继续第 1 步。
Check if a non-empty
config.json
exists in the root directory of this skill (where SKILL.md is located):
  • Exists → Indicates it was configured before (skill update/reinstallation caused document rollback). Run directly:
    python <skill-directory>/scripts/Init.py --rebuild-doc
    to rebuild the official documentation from the existing configuration. Do not ask the user for any information again.
  • Does not exist → Proceed to Step 1.

第 1 步:向用户解释两个概念并收集信息

Step 1: Explain Two Concepts to the User and Collect Information

agent 邮箱(必配):agent 专属邮箱,只属于 agent 自己。配置后 agent 可不经用户确认自由使用——自主注册网站、接收验证码、测试项目等。建议用户专门注册一个小号邮箱(如 QQ 邮箱),不要用常用邮箱。
需要收集:
  1. agent 邮箱地址(如
    xxx@qq.com
  2. 该邮箱的授权码(注意:不是登录密码)
若用户不知道如何获取授权码,按邮箱类型指导:
  • QQ 邮箱 / FOXMAIL:网页版 设置 → 账户 → 开启 SMTP/IMAP 服务 → 生成授权码
  • 163 / 126 邮箱:网页版 设置 → POP3/SMTP/IMAP → 开启服务 → 设置授权码
  • Gmail:Google 账号 → 安全性 → 先开启两步验证 → 应用专用密码
  • Outlook/Hotmail:Microsoft 账号 → 安全 → 应用密码
Agent Email (Required) : An exclusive email belonging only to the agent. After configuration, the agent can use it freely without user confirmation—such as autonomously registering websites, receiving verification codes, testing projects, etc. It is recommended that the user register a dedicated secondary email (e.g., QQ Mail) instead of using their commonly used email.
Information to collect:
  1. Agent email address (e.g.,
    xxx@qq.com
    )
  2. Authorization code for this email (Note: This is not the login password)
If the user does not know how to obtain the authorization code, guide them according to the email type:
  • QQ Mail / FOXMAIL: Web version → Settings → Account → Enable SMTP/IMAP service → Generate authorization code
  • 163 / 126 Mail: Web version → Settings → POP3/SMTP/IMAP → Enable service → Set authorization code
  • Gmail: Google Account → Security → First enable two-step verification → App-specific password
  • Outlook/Hotmail: Microsoft Account → Security → App password

第 2 步:SMTP/IMAP 服务器地址

Step 2: SMTP/IMAP Server Addresses

Init.py 内置主流邮箱域名探测表(qq/foxmail/163/126/gmail/outlook/hotmail/live/sina/sohu/139/aliyun 等),能自动识别的域名无需询问用户。仅当邮箱域名不在表中时,才询问用户该邮箱的 SMTP 和 IMAP 服务器地址(可在邮箱服务商帮助页找到)。
Init.py has a built-in detection table for mainstream email domains (qq/foxmail/163/126/gmail/outlook/hotmail/live/sina/sohu/139/aliyun, etc.). No need to ask the user for domains that can be automatically identified. Only when the email domain is not in the table, ask the user for the SMTP and IMAP server addresses of the email (which can be found in the email service provider's help page).

第 3 步:询问是否配置用户邮箱(可选)

Step 3: Ask Whether to Configure User Email (Optional)

向用户解释:用户邮箱是用户实际使用的邮箱。配置后 agent 可以在获得用户明确同意的前提下临时使用(例如帮用户注册需要长期使用的账号)。每次使用前都必须用户确认,agent 不得自行猜测或沿用之前的许可。
  • 用户同意配置 → 收集用户邮箱地址 + 授权码(同第 1、2 步方式)
  • 用户拒绝 → 跳过,仅 agent 邮箱即可完整使用本 skill
Explain to the user: User Email is the email actually used by the user. After configuration, the agent can use it temporarily only with the user's explicit consent (e.g., helping the user register an account that needs long-term use). The agent must obtain user confirmation before each use, and shall not guess or reuse previous permissions on its own.
  • User agrees to configure → Collect user email address + authorization code (following the same method as Steps 1 and 2)
  • User refuses → Skip, only the agent email is sufficient to fully use this skill

第 4 步:执行初始化

Step 4: Perform Initialization

运行 Init.py(把参数替换为实际值;服务器参数仅未知域名时才需要传):
bash
python <skill目录>/scripts/Init.py \
  --agent-email "xxx@qq.com" \
  --agent-auth-code "授权码" \
  --user-email "user@example.com" --user-auth-code "授权码"
Run Init.py (replace parameters with actual values; server parameters are only required when the domain is unknown):
bash
python <skill-directory>/scripts/Init.py \
  --agent-email "xxx@qq.com" \
  --agent-auth-code "authorization code" \
  --user-email "user@example.com" --user-auth-code "authorization code"

未配置用户邮箱时:--user-email false(或不传任何 --user-* 参数)

When user email is not configured: --user-email false (or omit all --user-* parameters)

未知域名时附加:--agent-smtp "smtp.xxx.com:465" --agent-imap "imap.xxx.com:993"

For unknown domains, add: --agent-smtp "smtp.xxx.com:465" --agent-imap "imap.xxx.com:993"


脚本会实测 SMTP/IMAP 登录并自动把本文档重写为正式使用说明。成功后向用户确认初始化完成;失败则把脚本的错误信息转告用户并修正后重试。

最后提醒用户:授权码只保存在本机 `config.json` 中,不会上传。

The script will test SMTP/IMAP login and automatically rewrite this document into official usage instructions. Confirm initialization completion with the user after success; if it fails, inform the user of the script's error message and retry after correction.

Finally, remind the user: The authorization code is only stored locally in `config.json` and will not be uploaded.