context-infra 检查与复盘infra.guiming.net · 全内容自包含呈现 · 生成于 2026-07-21 16:28 UTC

Send Email via Gmail

Z3 全文↑ Z2 条目

术-操作 · 术层 skill 全文

← 返回术层 skill 索引 · 返回方法论区

本页是 <code>rules/skills/send_email.md</code> 的逐字投影(仅隐私清洗,零改写)。

时点提示:本页是仓内文件 rules/skills/send_email.md 的逐字投影(仅做隐私清洗:仓库根绝对路径→相对路径、家目录→~/;除此零改写)。若源文件后续有修订,以仓内真源为准。

Skill: Send Email via Gmail

This skill allows the AI to send email notifications using a Gmail app-specific password.

When to Use

Prerequisites

Gmail App Password Setup

  1. Go to Google Account → Security → 2-Step Verification
  2. At the bottom: App passwords → Generate a new app password
  3. Add to .env:

Usage

Basic usage (plain text)

python3 tools/send_email_to_myself.py "Subject Here" "Body Here"

Send to a specific address

python3 tools/send_email_to_myself.py "Subject Here" "Body Here" --to <recipient-email>

Send HTML content

python3 tools/send_email_to_myself.py "Subject Here" "<h1>HTML Body</h1>" --html

Send from file (Markdown auto-converted to HTML)

python3 tools/send_email_to_myself.py "Report Title" "" --file path/to/report.md

Send from file with custom CSS

python3 tools/send_email_to_myself.py "Report Title" "" --file path/to/report.md --css path/to/styles.css

Markdown to HTML Conversion

当使用 --file 参数指定 .md 文件时,脚本会自动将 Markdown 转换为 HTML:

内置 GitHub 风格 CSS,可通过 --css 参数自定义。

Example

Send a markdown report as styled HTML email:

python3 tools/send_email_to_myself.py "Weekly AI Report" "" --file contexts/survey_sessions/ai_news_weekly.md

← 返回术层 skill 索引 · 返回方法论区