Install
openclaw skills install email-bridgeEmail management skill for AI assistants with real-time notifications, smart categorization (7 categories), verification code extraction, and HTML content sanitization. Supports Gmail, QQ Mail, and NetEase.
openclaw skills install email-bridgeEmail management skill for OpenClaw. Provides real-time email monitoring with smart categorization and clean notifications for AI assistants.
cd skills/email-bridge
pip install -e .
⚠️ Security Note: Do NOT share authorization codes in chat. Configure accounts via CLI only.
# Add account (prompts for authorization code securely)
email-bridge accounts add your@qq.com -p qq
# Sync emails
email-bridge sync
# Start daemon for real-time notifications
email-bridge daemon start -d
QQ Mail: https://service.mail.qq.com/detail/0/75 (send SMS, get 16-char code)
NetEase (163/126): Settings → POP3/SMTP/IMAP → Enable → Get code
Gmail: Requires OAuth setup (see README.md)
openclaw system eventSubject-only classification for fast, reliable categorization:
| Category | Icon | Description | Example Keywords |
|---|---|---|---|
| verification | 🔐 | Verification codes, activation | 验证码, OTP, activate, 绑定邮箱 |
| security | ⚠️ | Security alerts, login warnings | 安全提醒, security alert, 密码修改 |
| transactional | 📦 | Orders, payments, shipping | 订单确认, receipt, 发货通知 |
| promotion | 🎁 | Marketing, promotions, rewards | 奖励, 优惠, promo, discount |
| subscription | 📰 | Newsletters, digests | newsletter, 订阅, weekly digest |
| spam_like | 🚫 | Suspected spam | 中奖, FREE, click here now |
| normal | — | Regular email | (default) |
Chinese: 邮箱、邮件、发邮件、查看邮件、验证码、QQ邮箱、Gmail
English: email, mail, send email, check email, verification code
# List recent emails
email-bridge messages list -n 10
# Get verification codes from recent emails
email-bridge codes
# Send email
email-bridge send -a <account_id> -t recipient@example.com -s "Subject" -b "Body"
# Daemon management
email-bridge daemon status
email-bridge daemon stop
Configuration file: ~/.email-bridge/config.json
Default configuration (auto-generated, minimal):
{
"daemon": {
"poll_interval": 300,
"notify_openclaw": true
}
}
Full configuration with all options (customize as needed):
{
"daemon": {
"poll_interval": 300,
"notify_openclaw": true,
"notification": {
"include_body": false,
"body_max_length": 500,
"include_verification_codes": true,
"include_links": false
}
}
}
| Option | Default | Description |
|---|---|---|
include_body | false | Include email body preview in notifications |
body_max_length | 500 | Max characters for body preview |
include_verification_codes | true | Auto-extract and show verification codes |
include_links | false | Include action links (verify/reset) |
When new emails arrive, the daemon sends formatted notifications:
📧 新邮件: account@qq.com
1. 🔐 Google
您的验证码
✨ 验证码: 123456
2. ⚠️ Microsoft
登录提醒
📝 We noticed a new sign-in...
3. 🎁 OKX
150 USDT 奖励等您拿
📝 亲爱的欧易用户,欧易诚邀您加入邀请好友计划...
HTML-only emails are processed through:
<style>, <script>, and all HTML tagsExample: HTML with invisible chars → Clean readable text
All data stored locally at ~/.email-bridge/:
~/.email-bridge/
├── email_bridge.db # SQLite database (accounts, messages)
├── config.json # Configuration file
├── daemon.pid # Daemon process ID
├── daemon.log # Logs
└── gmail/
├── credentials.json # OAuth credentials
└── token_*.json # OAuth tokens
⚠️ Credentials are stored unencrypted. Protect this directory.
# Stop daemon
email-bridge daemon stop
# Remove all stored data
rm -rf ~/.email-bridge
# For Gmail: revoke at https://myaccount.google.com/permissions
# For QQ/NetEase: regenerate authorization codes in email settings
All from PyPI:
~/.email-bridge/ directorysanitize_for_notification()