imap-smtp-email
Read and send email via IMAP/SMTP. Check for new/unread messages, fetch content, search mailboxes, mark as read/unread, and send emails with attachments. Supports multiple accounts. Works with any IMAP/SMTP server including Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, and vip.188.com.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/arry8/imap-smtp-email-fixedIMAP/SMTP Email Tool
Read, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, vip.163.com, 126.com, vip.126.com, 188.com, vip.188.com, and any standard IMAP/SMTP server.
Configuration
Run the setup script to configure your email account:
bash setup.sh
Configuration is split into two files:
config.env(skill directory) — server hosts, ports, TLS settings, allowed dirs~/.openclaw/.env— credentials (user, password, from address)
Legacy fallback: ~/.config/imap-smtp-email/.env (single combined file).
Config file format
# Default account (no prefix)
IMAP_HOST=imap.gmail.com
IMAP_PORT=993
[email protected]
IMAP_PASS=your_password
IMAP_TLS=true
IMAP_REJECT_UNAUTHORIZED=true
IMAP_MAILBOX=INBOX
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE=false
[email protected]
SMTP_PASS=your_password
[email protected]
SMTP_REJECT_UNAUTHORIZED=true
# File access whitelist (security)
ALLOWED_READ_DIRS=~/Downloads,~/Documents
ALLOWED_WRITE_DIRS=~/Downloads
Multi-Account
You can configure additional email accounts in the same config file. Each account uses a name prefix (uppercase) on all variables.
Adding an account
Run the setup script and choose "Add a new account":
bash setup.sh
Or manually add prefixed config to config.env and secrets to ~/.openclaw/.env:
# Work account (WORK_ prefix)
WORK_IMAP_HOST=imap.company.com
WORK_IMAP_PORT=993
[email protected]
WORK_IMAP_PASS=password
WORK_IMAP_TLS=true
WORK_IMAP_REJECT_UNAUTHORIZED=true
WORK_IMAP_MAILBOX=INBOX
WORK_SMTP_HOST=smtp.company.com
WORK_SMTP_PORT=587
WORK_SMTP_SECURE=false
[email protected]
WORK_SMTP_PASS=password
[email protected]
WORK_SMTP_REJECT_UNAUTHORIZED=true
Using a named account
Add --account <name> before the command:
node scripts/imap.js --account work check
node scripts/smtp.js --account work send --to [email protected] --subject Hi --body Hello
Without --account, the default (unprefixed) account is used.
Account name rules
- Letters and digits only (e.g.,
work,163,personal2) - Case-insensitive:
workandWORKrefer to the same account - The prefix in
.envis always uppercase (e.g.,WORK_IMAP_HOST) ALLOWED_READ_DIRSandALLOWED_WRITE_DIRSare shared across all accounts (always unprefixed)
Common Email Servers
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-arry8-imap-smtp-email-fixed": {
"enabled": true,
"auto_update": true
}
}
}