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

- Skill: `ruc-nlpir/imap-smtp-email` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add ruc-nlpir/imap-smtp-email`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ruc-nlpir/imap-smtp-email/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: ruc-nlpir (https://skillmd.com/u/ruc-nlpir)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/ruc-nlpir/imap-smtp-email

---


# IMAP/SMTP Email Tool

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

## Configuration

```bash
bash setup.sh
```

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

## IMAP Commands (Receiving Email)

```bash
# Check unread emails
node scripts/imap.js check [--limit 10] [--recent 2h]

# Fetch full email by UID
node scripts/imap.js fetch <uid>

# Search emails
node scripts/imap.js search --unseen --recent 7d --limit 20

# Mark as read/unread
node scripts/imap.js mark-read <uid>
```

## SMTP Commands (Sending Email)

```bash
# Send email
node scripts/smtp.js send --to recipient@example.com --subject "Subject" --body "Body"

# Send with attachment
node scripts/smtp.js send --to recipient@example.com --subject "Report" --body "See 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"
```

## Security Notes

- Configuration stored at `~/.config/imap-smtp-email/.env` with `600` permissions
- For Gmail: use App Password, not regular password
- For 163.com: use authorization code (授权码)

