π¦ ClawHub
email-suite (imap+smtp)
by @rashed-mamoon
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, mar...
TERMINAL
clawhub install email-suite-imap-smtpπ About This Skill
email-suite
Email CLI: node scripts/mail.js . Works with Gmail, Outlook, Hostinger, any IMAP/SMTP server.
Setup
Automated (recommended)
bash setup.sh
Runs: Node.js check β npm install β provider menu β credentials β display name β signature β summary β connection testManual
npm install
cp env.example.txt .env # Edit with your credentials
.env Configuration
Required
# IMAP (receiving)
IMAP_HOST=imap.gmail.com
IMAP_PORT=993
IMAP_USER=your@email.com
IMAP_PASS=your_app_passwordSMTP (sending)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE=false # true for port 465, false for 587
SMTP_USER=your@email.com
SMTP_PASS=your_app_password
Optional
SMTP_FROM=your@email.com # Default sender
FROM_NAME="Your Name" # Display name shown to recipients
IMAP_REJECT_UNAUTHORIZED=false # For self-signed certs
SMTP_REJECT_UNAUTHORIZED=false # For self-signed certs
Provider Presets
| Provider | IMAP Host | Port | SMTP Host | Port | Secure | |----------|-----------|------|-----------|------|--------| | Gmail | imap.gmail.com | 993 | smtp.gmail.com | 587 | false | | Outlook | outlook.office365.com | 993 | smtp.office365.com | 587 | false | | Hostinger | imap.hostinger.com | 993 | smtp.hostinger.com | 465 | true |Gmail/Outlook: Use App Password
Not your regular password β generate a 16-char App Password:Essential Commands
| Command | Description |
|---------|-------------|
| check | Inbox from cache (~0.2s). Shows sync time. --all for read+unread combined. |
| sync | Fetch NEW messages only. Updates cache. |
| fetch | Read email. Shows action hints. Marks as read, updates cache. |
| send --to x --subject "S" --body "B" | Send email |
| search --from "x" --since 7d | Search cache. --server for full search. |
| delete | Delete permanently |
Flags
--all β All messages (read + unread, combined chronological)--limit N β Limit results--since 7d β Time filter (7d, 1m, YYYY-MM-DD)--before YYYY-MM-DD β Before dateMulti-ID
delete # Delete multiple
mark-read # Mark multiple read
Send Options
--body-file x.md β Markdown auto-converted to HTML--attach file.pdf β Attachmentsreply --body "T" β Reply (auto Re: prefix)forward --to x β ForwardCache
.cache/inbox.json β Local cache for fast checkssync = incremental (new msgs only)fetch = always server, marks read, updates cachedelete / clear-cache = clears cacheSecurity
.env to gitchmod 600 .env to protect credentialsβοΈ Configuration
Automated (recommended)
bash setup.sh
Runs: Node.js check β npm install β provider menu β credentials β display name β signature β summary β connection testManual
npm install
cp env.example.txt .env # Edit with your credentials