Imap Smtp Email logo

Imap Smtp Email

Community
wentorai
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.

Overview

Publisherwentorai
RepositoryResearch-Claw
Skill nameimap-smtp-email
Stars
859
Forks
117
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by wentorai on GitHub. Read the source before you install it.

Installation

Install the Imap Smtp Email AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/wentorai/Research-Claw/tree/main/skills/imap-smtp-email
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wentorai/Research-Claw.git /tmp/Research-Claw
mkdir -p .claude/skills
cp -r /tmp/Research-Claw/skills/imap-smtp-email .claude/skills/imap-smtp-email
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Imap Smtp Email in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Imap Smtp Email on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Imap Smtp Email is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

IMAP/SMTP Email

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


Supported Providers

ProviderIMAP HostIMAP PortSMTP HostSMTP Port
163.comimap.163.com993smtp.163.com465
vip.163.comimap.vip.163.com993smtp.vip.163.com465
126.comimap.126.com993smtp.126.com465
Gmailimap.gmail.com993smtp.gmail.com587
Outlookoutlook.office365.com993smtp.office365.com587
QQ Mailimap.qq.com993smtp.qq.com587

Configuration

Setup

bash
bash setup.sh

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

Config File Format

bash
# Default account (no prefix)
IMAP_HOST=imap.gmail.com
IMAP_PORT=993
IMAP_USER=your@email.com
IMAP_PASS=your_password
IMAP_TLS=true
IMAP_MAILBOX=INBOX

SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=your@email.com
SMTP_PASS=your_password
SMTP_FROM=your@email.com

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

Multi-Account Support

Adding an Account

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

Or manually add prefixed variables:

bash
# Work account (WORK_ prefix)
WORK_IMAP_HOST=imap.company.com
WORK_IMAP_PORT=993
WORK_IMAP_USER=me@company.com
WORK_IMAP_PASS=password
WORK_SMTP_HOST=smtp.company.com
WORK_SMTP_PORT=587
WORK_SMTP_USER=me@company.com
WORK_SMTP_PASS=password

Using a Named Account

bash
# Use --account <name> before the command
node scripts/imap.js --account work check
node scripts/smtp.js --account work send --to foo@bar.com --subject Hi --body Hello

IMAP Commands (Receiving Email)

check — Check for New Emails

bash
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

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

download — Download Attachments

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

search — Search Emails

bash
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

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

list-mailboxes

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

list-accounts

bash
node scripts/imap.js list-accounts

SMTP Commands (Sending Email)

send — Send Email

bash
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:

bash
# Simple text email
node scripts/smtp.js send --to recipient@example.com --subject "Hello" --body "World"

# HTML email
node scripts/smtp.js send --to recipient@example.com --subject "Newsletter" --html --body "<h1>Welcome</h1>"

# Email with attachment
node scripts/smtp.js send --to recipient@example.com --subject "Report" --body "Please find attached" --attach report.pdf

# Multiple recipients
node scripts/smtp.js send --to "a@example.com,b@example.com" --cc "c@example.com" --subject "Update" --body "Team update"

test — Test SMTP Connection

bash
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

bash
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

Frequently asked questions

What does the Imap Smtp Email AI skill do?

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.

Why use Imap Smtp Email on TypingMind?

Because you install it once and use it with any model. Imap Smtp Email is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Imap Smtp Email in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/wentorai/Research-Claw/tree/main/skills/imap-smtp-email. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Imap Smtp Email?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Imap Smtp Email?

As many as you like. As long as a model supports skills, you can use Imap Smtp Email with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Imap Smtp Email AI skill free?

It is published on GitHub by wentorai. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇