OpenClaw skill for reading and sending email via standard IMAP and SMTP servers. Python stdlib only - zero external dependencies.
- Read and list messages via IMAP SSL
- Search messages with flexible criteria (sender, subject, date, text, unseen)
- Send email via SMTP STARTTLS (plain text + HTML)
- Move, delete, mark read/unread
- List folders and check quota
- All capabilities disabled by default - explicit opt-in required
clawhub install mail-clientOr clone manually:
git clone https://github.com/Rwx-G/openclaw-skill-mail-client.git skills/mail-client
cd skills/mail-client
python3 scripts/setup.py# 1. Run interactive setup (creates credentials + config)
python3 scripts/setup.py
# 2. Validate setup
python3 scripts/init.py
# 3. Use the CLI
python3 scripts/mail.py list --limit 5
python3 scripts/mail.py read 42
python3 scripts/mail.py send --to alice@example.com --subject "Hello" --body "Hi Alice"All capabilities are false by default. Edit config.json (generated by setup.py)
to enable what the agent is allowed to do:
{
"allow_send": false,
"allow_read": false,
"allow_search": false,
"allow_delete": false,
"smtp_port": 587,
"imap_port": 993,
"mail_from": "",
"default_folder": "INBOX",
"max_results": 20
}Note:
config.jsonis NOT shipped in this repository (it is gitignored). Copyconfig.example.jsonas a starting template and edit as needed.
Credentials are stored in ~/.openclaw/secrets/mail_creds (chmod 600), never in the skill directory.
See SKILL.md section "Storage and credentials" for details.
- Python stdlib only:
imaplib,smtplib,email,json,os,sys,pathlib - TLS/SSL enabled by default (IMAP4_SSL + STARTTLS)
- All capabilities false by default
- Credentials isolated from skill directory with strict permissions
- No external HTTP calls
MIT - Copyright (c) 2026 Romain Grosos