# Send IMAP Email Reader to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "imap-email",
    "name": "IMAP Email Reader",
    "source": "tencent",
    "type": "skill",
    "category": "效率提升",
    "sourceUrl": "https://clawhub.ai/mvarrieur/imap-email",
    "canonicalUrl": "https://clawhub.ai/mvarrieur/imap-email",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/imap-email",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=imap-email",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "package-lock.json",
      "package.json",
      "scripts/imap.js",
      "setup.sh",
      "skill.json"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "imap-email",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T04:50:47.079Z",
      "expiresAt": "2026-05-07T04:50:47.079Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=imap-email",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=imap-email",
        "contentDisposition": "attachment; filename=\"imap-email-1.0.3.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "imap-email"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/imap-email"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/imap-email",
    "downloadUrl": "https://openagent3.xyz/downloads/imap-email",
    "agentUrl": "https://openagent3.xyz/skills/imap-email/agent",
    "manifestUrl": "https://openagent3.xyz/skills/imap-email/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/imap-email/agent.md"
  }
}
```
## Documentation

### IMAP Email Reader

Read, search, and manage email via IMAP protocol. Supports ProtonMail Bridge, Gmail IMAP, and any standard IMAP server.

### Quick Start

Check for new emails:

node skills/imap-email/scripts/imap.js check

Fetch specific email:

node skills/imap-email/scripts/imap.js fetch <uid>

Mark as read:

node skills/imap-email/scripts/imap.js mark-read <uid>

Search mailbox:

node skills/imap-email/scripts/imap.js search --from "sender@example.com" --unseen

### Configuration

Quick setup (ProtonMail Bridge):

cd skills/imap-email
./setup.sh

The setup helper will prompt for Bridge credentials and test the connection.

Manual setup:

Copy .env.example to .env in the skill folder
Fill in your IMAP credentials
The .env file is automatically ignored by git

Environment variables:

IMAP_HOST=127.0.0.1          # Server hostname
IMAP_PORT=1143               # Server port
IMAP_USER=your@email.com
IMAP_PASS=your_password
IMAP_TLS=false               # Use TLS/SSL connection
IMAP_REJECT_UNAUTHORIZED=false  # Set to false for self-signed certs (optional)
IMAP_MAILBOX=INBOX           # Default mailbox

⚠️ Security: Never commit your .env file! It's already in .gitignore to prevent accidents.

ProtonMail Bridge setup:

Install and run ProtonMail Bridge
Use 127.0.0.1:1143 for IMAP
Password is generated by Bridge (not your ProtonMail password)
TLS: Use false (Bridge uses STARTTLS)
REJECT_UNAUTHORIZED: Set to false (Bridge uses self-signed cert)

Gmail IMAP setup:

Host: imap.gmail.com
Port: 993
TLS: true
Enable "Less secure app access" or use App Password
REJECT_UNAUTHORIZED: Omit or set to true (default)

### check

Check for unread/new emails in mailbox.

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

Options:

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

Returns JSON array of messages with:

uid, from, subject, date, snippet, flags

### fetch

Fetch full email content by UID.

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

Returns JSON with full body (text + HTML).

### search

Search emails with filters.

node scripts/imap.js 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 (e.g., 30m, 2h, 7d)
  --since <date>     After date (YYYY-MM-DD)
  --before <date>    Before date (YYYY-MM-DD)
  --limit <n>        Max results (default: 20)
  --mailbox <name>   Mailbox to search (default: INBOX)

Time format examples:

30m = last 30 minutes
2h = last 2 hours
7d = last 7 days

### mark-read / mark-unread

Mark message(s) as read or unread.

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

### list-mailboxes

List all available mailboxes/folders.

node scripts/imap.js list-mailboxes

### Cron Integration

Set up periodic email checking with Clawdbot cron:

# Check email every 15 minutes, deliver to iMessage
clawdbot cron add \\
  --name "email-check" \\
  --cron "*/15 * * * *" \\
  --session isolated \\
  --message "Check for new ProtonMail emails and summarize them" \\
  --deliver \\
  --channel imessage \\
  --to "+15085600825"

Inside the isolated session, the agent can run:

node /Users/mike/clawd/skills/imap-email/scripts/imap.js check --limit 5

### Workflow Examples

Morning email digest:

Run check --limit 10 --recent 12h
Summarize unread emails from overnight
Deliver summary to preferred channel

Check recent emails from specific sender:

Run search --from "important@company.com" --recent 24h
Fetch full content if needed
Mark as read after processing

Hourly urgent email check:

Run search --recent 1h --unseen
Filter for important keywords
Extract action items
Deliver notification if urgent

Weekly digest:

Run search --recent 7d --limit 20
Summarize activity
Generate weekly report

### Dependencies

Required packages: imap-simple, mailparser, dotenv

Installation:

cd skills/imap-email
npm install

This will install all dependencies listed in package.json.

### Security Notes

Store credentials in .env (add to .gitignore)
ProtonMail Bridge password is NOT your account password
Bridge must be running for ProtonMail IMAP access
Consider using app-specific passwords for Gmail

### Troubleshooting

Connection timeout:

Verify IMAP server is running and accessible
Check host/port configuration
Test with: telnet <host> <port>

Authentication failed:

Verify username (usually full email address)
Check password is correct
For ProtonMail Bridge: use Bridge-generated password, not account password
For Gmail: use App Password if 2FA is enabled

TLS/SSL errors:

Match IMAP_TLS setting to server requirements (true for SSL, false for STARTTLS)
For self-signed certs (e.g., ProtonMail Bridge): set IMAP_REJECT_UNAUTHORIZED=false
Check port matches TLS setting (993 for SSL, 143 for STARTTLS)

Empty results:

Verify mailbox name (case-sensitive)
Check search criteria
List mailboxes with list-mailboxes
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: mvarrieur
- Version: 1.0.3
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-30T04:50:47.079Z
- Expires at: 2026-05-07T04:50:47.079Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/imap-email)
- [Send to Agent page](https://openagent3.xyz/skills/imap-email/agent)
- [JSON manifest](https://openagent3.xyz/skills/imap-email/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/imap-email/agent.md)
- [Download page](https://openagent3.xyz/downloads/imap-email)