eMail manager lite
by @jorgermp
Lightweight email manager with IMAP/SMTP support, advanced search, folder management, and attachment detection. Works with Zoho, Gmail, Outlook, and any IMAP/SMTP provider.
clawhub install email-manager-liteπ About This Skill
name: portable-email-manager version: 0.2.0 description: Lightweight email manager with IMAP/SMTP support, advanced search, folder management, and attachment detection. Works with Zoho, Gmail, Outlook, and any IMAP/SMTP provider.
Email Manager Lite v0.2
A fully self-contained email management skill for OpenClaw. Uses standard IMAP and SMTP protocols with zero external dependencies.
β¨ What's New in v0.2
π Advanced Search & Filters
--from)--subject)--since, --before)--seen, --unseen)--body, warning: can be slow)π Folder Management
folders commandmove commandπ Attachment Information
read and search resultsπ§ Installation
cd skills/portable-email-manager
npm install
Dependencies are bundled in package.json:
nodemailer - SMTP email sendingimap-simple - IMAP operationsmailparser - Email parsing and attachment detectionπ Credentials
Set these environment variables:
export EMAIL_USER="your.email@domain.com"
export EMAIL_PASS="your-app-password"
Recommended: Use App Passwords for Gmail, Outlook, Zoho instead of main password.
Provider Setup
Zoho Mail (default):
smtp.zoho.eu and imap.zoho.euGmail:
scripts/email.js and change: host: 'smtp.gmail.com' // SMTP
host: 'imap.gmail.com' // IMAP
Outlook/Hotmail:
smtp.office365.com / outlook.office365.comπ Usage
Send Email
./scripts/email.js send "recipient@example.com" "Subject" "Email body text"
Example:
./scripts/email.js send "boss@company.com" "Weekly Report" "Attached is this week's summary."
Read Recent Emails
./scripts/email.js read [limit]
Examples:
# Read last 5 emails (default)
./scripts/email.js readRead last 20 emails
./scripts/email.js read 20
Output includes:
Advanced Search
./scripts/email.js search [options]
Search Options:
| Option | Description | Example |
|--------|-------------|---------|
| --from | Filter by sender | --from "boss@company.com" |
| --subject | Filter by subject keywords | --subject "invoice" |
| --since | Emails after date | --since "Jan 1, 2026" |
| --before | Emails before date | --before "Feb 1, 2026" |
| --unseen | Only unread emails | --unseen |
| --seen | Only read emails | --seen |
| --body | Search in body (slow!) | --body "meeting" |
| --limit | Max results | --limit 10 |
Examples:
# Find unread emails from specific sender
./scripts/email.js search --from "client@example.com" --unseenSearch by subject
./scripts/email.js search --subject "invoice" --limit 5Date range search
./scripts/email.js search --since "Jan 15, 2026" --before "Feb 1, 2026"Search in body (use sparingly - can be slow)
./scripts/email.js search --body "quarterly review"Combine multiple filters
./scripts/email.js search --from "boss@company.com" --subject "urgent" --unseen --limit 3
List Folders
./scripts/email.js folders
Shows hierarchical tree of all IMAP folders with attributes.
Example output:
π INBOX
π Sent
π Archive
π Drafts
π Spam
π Trash
Move Email to Folder
./scripts/email.js move
Important:
uid from read or search outputExamples:
# First, find the email and note its UID
./scripts/email.js search --from "newsletter@example.com"
Output shows: UID: 12345
Move to Archive folder
./scripts/email.js move 12345 "Archive"Move to custom folder
./scripts/email.js move 67890 "Projects/Work"
Error handling:
Help
./scripts/email.js help
Shows complete usage guide with all commands and examples.
π― Use Cases
Daily Email Triage
# Check unread emails
./scripts/email.js search --unseen --limit 10Move newsletters to folder
./scripts/email.js search --from "newsletter@site.com" --limit 1
./scripts/email.js move "Newsletters"
Find Specific Email
# Search by sender and subject
./scripts/email.js search --from "client@example.com" --subject "proposal"Search by date
./scripts/email.js search --since "Jan 20, 2026" --subject "meeting notes"
Archive Old Emails
# Find old read emails
./scripts/email.js search --before "Dec 1, 2025" --seen --limit 50Move each to Archive (use UID from output)
./scripts/email.js move "Archive"
Check for Attachments
# Read recent emails and see attachment info
./scripts/email.js read 10Search output automatically shows:
- Number of attachments
- Filename, type, and size for each
π Security
βοΈ Configuration
Default configuration is optimized for Zoho Mail EU.
To use another provider, edit scripts/email.js:
// SMTP Configuration
const smtpConfig = {
host: 'smtp.your-provider.com',
port: 465, // or 587 for TLS
secure: true, // true for SSL (465), false for TLS (587)
auth: {
user: EMAIL_USER,
pass: EMAIL_PASS
}
};// IMAP Configuration
const imapConfig = {
imap: {
user: EMAIL_USER,
password: EMAIL_PASS,
host: 'imap.your-provider.com',
port: 993,
tls: true,
authTimeout: 20000
}
};
π Performance Notes
--body) can be slow on large mailboxes - use sparingly--limit for faster responsesπ Troubleshooting
"Authentication failed"
"Folder not found"
folders command to see exact folder names"Connection timeout"
authTimeout in config"No emails found"
π Version History
v0.2.0 (Current)
v0.1.0
π€ Compatibility
Tested with:
π‘ Tips
1. Use UIDs for automation: Save UIDs from search results to move emails programmatically 2. Combine filters: Multiple filters create AND conditions for precise searches 3. Folder organization: List folders first to plan your organization strategy 4. Date format: Use natural language dates like "Jan 1, 2026" or "December 25, 2025" 5. Attachment filtering: Look for "Attachments: X" in search output to find emails with files
π License
ISC - Use freely in your OpenClaw setup.