feishu-mail
Skill5 starsChanged 3 months agoApache-2.0View on GitHub
飞书企业邮箱管理与收发。当用户说"发邮件"、"收邮件"、"查邮件"、"回复邮件"、"send email"、"check email"、"加个邮箱"、"配置邮箱"、"create mailbox"、"setup email"等关键词时触发。
In this repository54 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-teamsSkill
- bilibili-channelSkill
- bot-configSkill
- browser-cliSkill
- bwrap-bypassSkill
- cc-pages-backupSkill
- chat-styleSkill
- chinese-dictationSkill
- code-wiki-reconSkill
- deck-builderSkill
- docx-form-fillerSkill
- evolutionSkill
- explainer-distillSkill
- feishu-bitableSkill
- feishu-docSkill
- feishu-sheetSkill
- feishu-user-msgSkill
- fireworks-tech-graphSkill
- frontend-slidesSkill
- gemini-ui-reviewerSkill
- hk-busSkill
- hk-share-award-tax-dipn38Skill
- imagen-generatorSkill
- issue-handlerSkill
- lecture-videoSkill
- lecture-voiceSkill
- lesson-read-aloudSkill
- live-canvasSkill
- lustre-mounterSkill
- manim-teaching-figuresSkill
- math-video-tutorSkill
- memory-gcSkill
- memory-lintSkill
- multimodal-explainerSkill
- music-generatorSkill
- notifySkill
- page-styleSkill
- paper-explainerSkill
- session-handoffSkill
- skill-creatorSkill
- smoke-testSkill
- study-materialSkill
- tmux-installerSkill
- tmux-orchestratorSkill
- tpuguruSkill
- tts-generatorSkill
- veo-generatorSkill
- vscode-referenceSkill
- weather-forecastSkill
- wechat-readerSkill
- wikiSkill
- youtube-channelSkill
- zsh-installerSkill
The file
Files
飞书企业邮箱(SMTP + IMAP)
每个 bot 有独立企业邮箱,SMTP 发信 + IMAP 收信,无需 OAuth。From 显示名自动取邮箱前缀。邮箱配置存储在 Firestore bots/{bot_name} 的 email 字段。
触发条件
- "发邮件"、"发 email"、"send email"、"邮件通知"
- "查邮件"、"收邮件"、"check email"、"看看邮箱"
- "回复邮件"、"reply email"
发送邮件
python3 ~/.claude/skills/feishu-mail/send_mail.py \
--to "收件人@example.com" \
--subject "标题" \
--body "正文内容"参数:
--to: 收件人(必填,多个逗号分隔)--subject: 标题(必填)--body: 正文(必填)--cc: 抄送(可选)--html: 正文为 HTML 格式
示例:
# 纯文本
python3 ~/.claude/skills/feishu-mail/send_mail.py \
--to "user@example.com" --subject "通知" --body "任务完成"
# HTML 邮件
python3 ~/.claude/skills/feishu-mail/send_mail.py \
--to "user@example.com" --subject "报告" --html \
--body "<h2>标题</h2><p>详情...</p>"查收邮件
python3 ~/.claude/skills/feishu-mail/recv_mail.py [选项]参数:
--limit N: 最多显示 N 封(默认 10)--unread: 只看未读--from "xxx": 按发件人过滤--subject "xxx": 按主题过滤--json: JSON 格式输出(适合程序处理)--folder "INBOX": 文件夹(默认 INBOX)
示例:
# 查看最近 5 封
python3 ~/.claude/skills/feishu-mail/recv_mail.py --limit 5
# 只看未读
python3 ~/.claude/skills/feishu-mail/recv_mail.py --unread
# 按发件人过滤
python3 ~/.claude/skills/feishu-mail/recv_mail.py --from "sender@example.com"
# JSON 输出
python3 ~/.claude/skills/feishu-mail/recv_mail.py --json --limit 3回复邮件
python3 ~/.claude/skills/feishu-mail/reply_mail.py \
--id "邮件ID" \
--body "回复内容"参数:
--id: 邮件 ID(从 recv_mail.py 输出获取,必填)--body: 回复正文(必填)--html: 正文为 HTML 格式--folder: 文件夹(默认 INBOX)
示例:
# 先查邮件获取 ID
python3 ~/.claude/skills/feishu-mail/recv_mail.py --limit 3
# 回复 ID 为 1 的邮件
python3 ~/.claude/skills/feishu-mail/reply_mail.py --id 1 --body "收到,谢谢!"典型工作流
# 1. 查看未读邮件
python3 ~/.claude/skills/feishu-mail/recv_mail.py --unread --json
# 2. 根据内容决定回复
python3 ~/.claude/skills/feishu-mail/reply_mail.py --id 1 --body "已处理"
# 3. 主动发新邮件
python3 ~/.claude/skills/feishu-mail/send_mail.py \
--to "someone@example.com" --subject "结果" --body "任务完成"配置
凭据从 Firestore bots/{bot_name} 的 email 字段读取,main.py 启动时自动映射到环境变量:
FEISHU_SMTP_HOST: smtp.feishu.cnFEISHU_SMTP_PORT: 465 (SSL)FEISHU_SMTP_USER: bot 企业邮箱地址FEISHU_SMTP_PASS: SMTP/IMAP 专用密码(飞书管理后台生成)
多 bot 同机时,各 bot 从 Firestore 读取独立邮箱配置,main.py 启动时自动设置环境变量。
IMAP 使用相同凭据,服务器 imap.feishu.cn:993 (SSL)。
邮箱管理(创建/删除公共邮箱)
通过 setup_mailbox.py 管理飞书公共邮箱,完整流程:创建邮箱 → 管理后台开启 SMTP → 配置密码到 Firestore。
创建公共邮箱
python3 ~/.claude/skills/feishu-mail/setup_mailbox.py create \
--email "bot@your-domain.com" \
--name "Bot Name"创建成功后,需要手动去飞书管理后台开启 SMTP:
- 打开 https://your-org.feishu.cn/admin/email/public_mailbox
- 找到新建的邮箱 → 开启 IMAP/SMTP → 生成应用密码
配置 SMTP 密码到 Firestore
# 默认写入 FIRESTORE_DATABASE (closecrab)
python3 ~/.claude/skills/feishu-mail/setup_mailbox.py set-password \
--bot athena \
--password "YOUR_APP_PASSWORD"
# 指定数据库(如 closecrab-public)
python3 ~/.claude/skills/feishu-mail/setup_mailbox.py set-password \
--bot athena \
--password "YOUR_APP_PASSWORD" \
--database closecrab-public
# 如果 bot 还没有 email 配置,用 --email 初始化完整配置
python3 ~/.claude/skills/feishu-mail/setup_mailbox.py set-password \
--bot newbot \
--password "xxx" \
--email "newbot@your-domain.com"列出所有公共邮箱
python3 ~/.claude/skills/feishu-mail/setup_mailbox.py list删除公共邮箱
python3 ~/.claude/skills/feishu-mail/setup_mailbox.py delete --mailbox-id "1RNM10VNQREQPKK"环境变量
MAIL_ADMIN_BOT: 用于调飞书 API 的 bot(需有mail:public_mailbox权限,默认jarvis)FIRESTORE_PROJECT: GCP 项目(默认your-gcp-project)FIRESTORE_DATABASE: Firestore 数据库(默认closecrab)
限制
- 发信频率: 200 封/100 秒
- 单日上限: 100 封/发件人
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

