PHPackages                             coquibot/coqui-toolkit-imap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. coquibot/coqui-toolkit-imap

ActiveLibrary[HTTP &amp; Networking](/categories/http)

coquibot/coqui-toolkit-imap
===========================

IMAP email management toolkit for Coqui — read, search, send, reply, and organize emails

v0.1.2(2mo ago)00MITPHPPHP ^8.4CI passing

Since Apr 9Pushed 2mo agoCompare

[ Source](https://github.com/carmelosantana/coqui-toolkit-imap)[ Packagist](https://packagist.org/packages/coquibot/coqui-toolkit-imap)[ RSS](/packages/coquibot-coqui-toolkit-imap/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (6)Versions (4)Used By (0)

Coqui Toolkit: IMAP
===================

[](#coqui-toolkit-imap)

IMAP email management toolkit for Coqui — read, search, send, reply, and organize emails directly from the terminal.

Features
--------

[](#features)

- **Read &amp; browse** — list folders, paginate messages, read full emails
- **Search** — find emails by subject, sender, recipient, date range
- **Send &amp; reply** — compose new emails and replies with proper threading headers
- **Organize** — move messages between folders, flag/unflag, delete
- **Folder management** — create, rename, and delete IMAP folders
- **Inbox summaries** — background-task-friendly digest of recent activity
- **Credential management** — integrates with Coqui's credential guard system
- **Safety gating** — destructive operations require user confirmation

Installation
------------

[](#installation)

```
composer require coquibot/coqui-toolkit-imap
```

Coqui auto-discovers the toolkit on next boot — no configuration code needed.

Credential Setup
----------------

[](#credential-setup)

The toolkit requires three credentials to connect. Coqui will prompt you automatically when you first use an IMAP tool.

### Required Credentials

[](#required-credentials)

CredentialDescription`IMAP_HOST`IMAP server hostname`IMAP_USERNAME`Email address / username`IMAP_PASSWORD`Password or app-specific password### Optional Credentials

[](#optional-credentials)

CredentialDefaultDescription`IMAP_PORT``993`IMAP server port`IMAP_ENCRYPTION``ssl`Encryption: `ssl` or `tls``SMTP_HOST`Same as `IMAP_HOST`SMTP server hostname`SMTP_PORT``587`SMTP server port`SMTP_USERNAME`Same as `IMAP_USERNAME`SMTP username`SMTP_PASSWORD`Same as `IMAP_PASSWORD`SMTP password`SMTP_ENCRYPTION``tls`SMTP encryption: `tls` or `ssl`### Provider Setup

[](#provider-setup)

#### Gmail

[](#gmail)

1. Enable 2-Step Verification at [myaccount.google.com/security](https://myaccount.google.com/security)
2. Generate an App Password at [myaccount.google.com/apppasswords](https://myaccount.google.com/apppasswords)
3. Set credentials:

```
IMAP_HOST=imap.gmail.com
IMAP_USERNAME=you@gmail.com
IMAP_PASSWORD=

```

Gmail uses the same credentials for SMTP — no separate SMTP config needed.

#### Microsoft 365 / Outlook

[](#microsoft-365--outlook)

```
IMAP_HOST=outlook.office365.com
IMAP_USERNAME=you@outlook.com
IMAP_PASSWORD=
SMTP_HOST=smtp.office365.com

```

> **Note:** Microsoft may require OAuth2 for some accounts. App passwords work for accounts with basic auth enabled.

#### Generic IMAP Server

[](#generic-imap-server)

```
IMAP_HOST=mail.example.com
IMAP_USERNAME=user@example.com
IMAP_PASSWORD=secret
SMTP_HOST=smtp.example.com

```

Tools Reference
---------------

[](#tools-reference)

ToolDescriptionGated`imap_list_folders`List all mailbox folders with message countsNo`imap_list_messages`Browse messages in a folder with filtersNo`imap_read_message`Read a specific email by UIDNo`imap_search`Search emails by subject, sender, dateNo`imap_move`Move messages to another folder**Yes**`imap_flag`Set or clear flags (seen, flagged, etc.)No`imap_delete`Delete messages**Yes**`imap_folder_manage`Create, rename, or delete foldersdelete: **Yes**`imap_send`Send a new email via SMTP**Yes**`imap_reply`Reply to an email with threading**Yes**`imap_summary`Get inbox activity summaryNoGated tools require user confirmation before execution (unless `--auto-approve` is enabled).

Example Workflows
-----------------

[](#example-workflows)

### Check unread emails

[](#check-unread-emails)

> "Check my inbox for unread emails"

The agent will:

1. List folders to find the inbox
2. Fetch unread messages
3. Present a summary of new emails

### Search and organize

[](#search-and-organize)

> "Find all emails from  and move them to a Newsletters folder"

The agent will:

1. Search for matching emails
2. Create the Newsletters folder if needed
3. Move matched messages (with your confirmation)

### Send a reply

[](#send-a-reply)

> "Reply to the last email from Alice saying I'll be there at 3pm"

The agent will:

1. Search for Alice's email
2. Read it for context
3. Compose and send a reply with proper threading headers

### Daily digest

[](#daily-digest)

> "Give me a summary of emails from the last 3 days"

The agent will use `imap_summary` with a date filter to generate a digest showing unread counts, top senders, and recent messages.

Dependencies
------------

[](#dependencies)

PackagePurpose[directorytree/imapengine](https://github.com/DirectoryTree/ImapEngine)IMAP protocol client (no ext-imap required)[symfony/mailer](https://github.com/symfony/mailer)SMTP email sending[symfony/mime](https://github.com/symfony/mime)Email message constructionDevelopment
-----------

[](#development)

### Run tests

[](#run-tests)

```
composer install
./vendor/bin/pest
```

### Project structure

[](#project-structure)

```
src/
├── ImapToolkit.php              # Entry point (ToolkitInterface)
├── Runtime/
│   ├── ImapClientFactory.php    # Lazy IMAP connection management
│   ├── MessageFormatter.php     # LLM-friendly email formatting
│   └── SmtpTransportFactory.php # SMTP transport with IMAP fallback
└── Tool/
    ├── ImapDeleteTool.php
    ├── ImapFlagTool.php
    ├── ImapFolderManageTool.php
    ├── ImapListFoldersTool.php
    ├── ImapListMessagesTool.php
    ├── ImapMoveTool.php
    ├── ImapReadMessageTool.php
    ├── ImapReplyTool.php
    ├── ImapSearchTool.php
    ├── ImapSendTool.php
    └── ImapSummaryTool.php
tests/
└── Unit/
    └── ImapToolkitTest.php

```

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance88

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

60d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/597820?v=4)[Carmelo Santana](/maintainers/carmelosantana)[@carmelosantana](https://github.com/carmelosantana)

---

Top Contributors

[![carmelosantana](https://avatars.githubusercontent.com/u/597820?v=4)](https://github.com/carmelosantana "carmelosantana (3 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/coquibot-coqui-toolkit-imap/health.svg)

```
[![Health](https://phpackages.com/badges/coquibot-coqui-toolkit-imap/health.svg)](https://phpackages.com/packages/coquibot-coqui-toolkit-imap)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.7k532.1M19.2k](/packages/laravel-framework)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

21764.8M1.6k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M195](/packages/sulu-sulu)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M444](/packages/pimcore-pimcore)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6941.5M395](/packages/drupal-core-recommended)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
