← Back to Plugins
Tools

Email Management

StressTestor By StressTestor 👁 255 views ▲ 0 votes

openclaw plugin for IMAP/SMTP email management. thread tracking, search, compose. day 18 of 20 days of claw.

GitHub

Install

openclaw plugins install -l

Configuration Example

{
  "plugins": {
    "email-management": {
      "imap": {
        "host": "imap.gmail.com",
        "port": 993,
        "user": "[email protected]",
        "password": "$EMAIL_APP_PASSWORD",
        "tls": true
      },
      "smtp": {
        "host": "smtp.gmail.com",
        "port": 587,
        "user": "[email protected]",
        "password": "$EMAIL_APP_PASSWORD",
        "tls": true
      },
      "fromName": "My Agent",
      "fromEmail": "[email protected]"
    }
  }
}

README

# email-management

openclaw plugin for full email access. IMAP for reading, SMTP for sending. thread tracking via Message-ID/In-Reply-To headers. search by sender, subject, date, read status.

no heavy dependencies. raw socket connections to IMAP/SMTP servers with TLS support.

## install

```bash
openclaw plugins install -l .
```

## config

```json
{
  "plugins": {
    "email-management": {
      "imap": {
        "host": "imap.gmail.com",
        "port": 993,
        "user": "[email protected]",
        "password": "$EMAIL_APP_PASSWORD",
        "tls": true
      },
      "smtp": {
        "host": "smtp.gmail.com",
        "port": 587,
        "user": "[email protected]",
        "password": "$EMAIL_APP_PASSWORD",
        "tls": true
      },
      "fromName": "My Agent",
      "fromEmail": "[email protected]"
    }
  }
}
```

### gmail setup

use an app password, not your real password. go to Google Account > Security > 2-Step Verification > App passwords.

### options

| option | default | what it does |
|--------|---------|-------------|
| `imap` | - | IMAP server config (host, port, user, password, tls) |
| `smtp` | - | SMTP server config (host, port, user, password, tls) |
| `fromName` | - | display name for outgoing emails |
| `fromEmail` | - | sender address (falls back to smtp user) |
| `maxResults` | `25` | default inbox list limit |

## tools

- **email_list** - list recent inbox messages with read status
- **email_read** - read full email by ID
- **email_send** - compose and send new email
- **email_search** - search by from, subject, date, read status
- **email_reply** - reply to a thread (auto-sets In-Reply-To)

## how it works

each tool call opens a fresh IMAP/SMTP connection, does the work, and disconnects. no persistent connections, no background processes. thread tracking uses standard Message-ID and In-Reply-To headers so replies land in the right thread on the recipient's end.

the IMAP client is minimal - just enough to list, fetch, and search. the SMTP client handles PLAIN auth and STARTTLS. no dependency on nodemailer or imap libraries.

## day 18 of [20 days of claw](https://github.com/StressTestor)
tools

Comments

Sign in to leave a comment

Loading comments...