Email management skill for OpenClaw. Provides real-time email monitoring with smart categorization and clean notifications for AI assistants.
bash
cd skills/email-bridge
pip install -e .
⚠️ Security Note: Do NOT share authorization codes in chat. Configure accounts via CLI only.
bash
# 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:
CategoryIconDescriptionExample Keywordsverification🔐Verification codes, activation验证码, OTP, activate, 绑定邮箱security⚠️Security alerts, login warnings安全提醒, security alert, 密码修改transactional📦Orders, payments, shipping订单确认, receipt, 发货通知promotion🎁Marketing, promotions, rewards奖励, 优惠, promo, discountsubscription📰Newsletters, digestsnewsletter, 订阅, weekly digestspam_like🚫Suspected spam中奖, FREE, click here nownormal—Regular email(default)
Chinese: 邮箱、邮件、发邮件、查看邮件、验证码、QQ邮箱、Gmail
English: email, mail, send email, check email, verification code
bash
# 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):
json
{
"daemon": {
"poll_interval": 300,
"notify_openclaw": true
}
}
Full configuration with all options (customize as needed):
json
{
"daemon": {
"poll_interval": 300,
"notify_openclaw": true,
"notification": {
"include_body": false,
"body_max_length": 500,
"include_verification_codes": true,
"include_links": false
}
}
}
OptionDefaultDescriptioninclude_body``falseInclude email body preview in notificationsbody_max_length``500Max characters for body previewinclude_verification_codes``trueAuto-extract and show verification codesinclude_links``falseInclude action links (verify/reset)
When new emails arrive, the daemon sends formatted notifications:
text
📧 新邮件: 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/:
text
~/.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.
bash
# 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()