wentorai/research-claw

imap-smtp-email

Read, search, and manage email via IMAP protocol. Send email via SMTP. Supports Gmail, Outlook, 163.com, 126.com, QQ Mail, and any standard IMAP/SMTP server with multi-account support.

First seen Apr 7, 2026

Installation

$ npx skills add wentorai/research-claw --skill imap-smtp-email

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from wentorai/research-claw · top by installs.

npx skills add wentorai/research-claw

Browse all from wentorai/research-claw

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 851
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 5,212 B
  • docs SUMMARY.md 207 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 13 installs

SKILL.md

IMAP/SMTP Email

Read, search, and manage email via IMAP. Send email via SMTP.


Supported Providers

Provider IMAP Host IMAP Port SMTP Host SMTP Port
163.com imap.163.com 993 smtp.163.com 465
vip.163.com imap.vip.163.com 993 smtp.vip.163.com 465
126.com imap.126.com 993 smtp.126.com 465
Gmail imap.gmail.com 993 smtp.gmail.com 587
Outlook outlook.office365.com 993 smtp.office365.com 587
QQ Mail imap.qq.com 993 smtp.qq.com 587

Configuration

Setup

bash setup.sh

Config stored at ~/.config/imap-smtp-email/.env

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_MAILBOX=INBOX

SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE=false
[email protected]
SMTP_PASS=your_password
[email protected]

# File access whitelist
ALLOWED_READ_DIRS=~/Downloads,~/Documents
ALLOWED_WRITE_DIRS=~/Downloads

Multi-Account Support

Adding an Account

# Run setup and choose "Add a new account"
bash setup.sh

Or manually add prefixed variables:

# Work account (WORK_ prefix)
WORK_IMAP_HOST=imap.company.com
WORK_IMAP_PORT=993
[email protected]
WORK_IMAP_PASS=password
WORK_SMTP_HOST=smtp.company.com
WORK_SMTP_PORT=587
[email protected]
WORK_SMTP_PASS=password

Using a Named Account

# Use --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

IMAP Commands (Receiving Email)

check — Check for New Emails

node scripts/imap.js [--account <name>] check [--limit 10] [--mailbox INBOX] [--recent 2h]

Options:

  • --limit: Max results (default: 10)
  • --mailbox: Mailbox to check (default: INBOX)
  • --recent: Only show emails from last X time (e.g., 30m, 2h, 7d)

fetch — Fetch Full Email

node scripts/imap.js [--account <name>] fetch <uid> [--mailbox INBOX]

download — Download Attachments

node scripts/imap.js [--account <name>] download <uid> [--dir <path>] [--file <filename>]

search — Search Emails

node scripts/imap.js [--account <name>] search [options]

Options:

  • --unseen: Only unread messages
  • --seen: Only read messages
  • --from <email>: From address contains
  • --subject <text>: Subject contains
  • --recent <time>: From last X time
  • --since <date>: After date (YYYY-MM-DD)
  • --before <date>: Before date (YYYY-MM-DD)
  • --limit <n>: Max results (default: 20)

mark-read / mark-unread

node scripts/imap.js [--account <name>] mark-read <uid> [uid2 uid3...]
node scripts/imap.js [--account <name>] mark-unread <uid> [uid2 uid3...]

list-mailboxes

node scripts/imap.js [--account <name>] list-mailboxes

list-accounts

node scripts/imap.js list-accounts

SMTP Commands (Sending Email)

send — Send Email

node scripts/smtp.js [--account <name>] send --to <email> --subject <text> [options]

Required:

  • --to: Recipient (comma-separated for multiple)
  • --subject: Email subject

Optional:

  • --body: Plain text body
  • --html: Send body as HTML
  • --body-file: Read body from file
  • --html-file: Read HTML from file
  • --cc: CC recipients
  • --bcc: BCC recipients
  • --attach: Attachments (comma-separated)
  • --from: Override default sender

Examples:

# Simple text email
node scripts/smtp.js send --to [email protected] --subject "Hello" --body "World"

# HTML email
node scripts/smtp.js send --to [email protected] --subject "Newsletter" --html --body "<h1>Welcome</h1>"

# Email with attachment
node scripts/smtp.js send --to [email protected] --subject "Report" --body "Please find attached" --attach report.pdf

# Multiple recipients
node scripts/smtp.js send --to "[email protected],[email protected]" --cc "[email protected]" --subject "Update" --body "Team update"

test — Test SMTP Connection

node scripts/smtp.js [--account <name>] test

Important Notes

Gmail

163.com / 126.com

  • Use authorization code (授权码), not account password
  • Enable IMAP/SMTP in web settings first

Dependencies

npm install

Security Notes

  • Config stored at ~/.config/imap-smtp-email/.env with 600 permissions
  • File access whitelist limits where attachments can be saved
  • Never commit .env files to version control