PHPackages                             gricob/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. [Mail &amp; Notifications](/categories/mail)
4. /
5. gricob/imap

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

gricob/imap
===========

IMAP client for PHP without php-imap extension dependency

0.2.4(1y ago)17.8k↓44.9%3MITPHPPHP ^8.2

Since Apr 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/gricob/imap)[ Packagist](https://packagist.org/packages/gricob/imap)[ Docs](https://github.com/gricob/imap)[ RSS](/packages/gricob-imap/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (13)Used By (0)

Quick start
===========

[](#quick-start)

Install
-------

[](#install)

```
composer require gricob/imap
```

Usage
-----

[](#usage)

```
$client = \Gricob\IMAP\Client::create(
    new \Gricob\IMAP\Configuration(
        transport: 'ssl',
        host: 'imap.example.com',
        port: 993,
        timeout: 60,
        verifyPeer: true,
        verifyPeerName: true,
        allowSelfSigned: false,
        useUid: true,
    )
);

$client->logIn('username', 'password');

// List available mailbox
$mailboxes = $client->mailboxes();

// Select an specific mailbox
$client->select($mailboxes[0]);

// Fetch message by sequence number or uid (depends on useUid configuration)
$message = $client->fetch(1);

// Or search messages by criteria
$messages = $client->search()
    ->since(new DateTime('yesterday'))
    ->not()->header('In-Reply-To'))
    ->get();
```

Testing
=======

[](#testing)

[Greenmail standalone](https://greenmail-mail-test.github.io/greenmail/#deploy_docker_standalone) IMAP server is configured in the docker compose file for testing. To start it, run the following command:

```
docker compose up
```

Once the IMAP server is up and running, run the following command to execute tests:

```
composer test
```

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93% 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 ~17 days

Recently: every ~28 days

Total

10

Last Release

588d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8c10487958ddf70d3a39b745887fde5720064f9a3e0521669e5889803ae009f9?d=identicon)[gricob](/maintainers/gricob)

---

Top Contributors

[![gricob](https://avatars.githubusercontent.com/u/22215962?v=4)](https://github.com/gricob "gricob (53 commits)")[![claudia-deliverea](https://avatars.githubusercontent.com/u/112933614?v=4)](https://github.com/claudia-deliverea "claudia-deliverea (2 commits)")[![cpuga05](https://avatars.githubusercontent.com/u/37425235?v=4)](https://github.com/cpuga05 "cpuga05 (1 commits)")[![cunyat](https://avatars.githubusercontent.com/u/6539648?v=4)](https://github.com/cunyat "cunyat (1 commits)")

---

Tags

imapimap-clientphpphp-libraryimap

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/gricob-imap/health.svg)

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

###  Alternatives

[php-imap/php-imap

Manage mailboxes, filter/get/delete emails in PHP (supports IMAP/POP3/NNTP)

1.7k12.9M42](/packages/php-imap-php-imap)[ddeboer/imap

Object-oriented IMAP for PHP

9153.9M11](/packages/ddeboer-imap)[webklex/php-imap

PHP IMAP client

4365.5M14](/packages/webklex-php-imap)[jason-munro/cypht

Lightweight Open Source webmail written in PHP and JavaScript

1.5k146.0k](/packages/jason-munro-cypht)[tedivm/fetch

A PHP IMAP Library

5061.2M8](/packages/tedivm-fetch)[directorytree/imapengine

A fully-featured IMAP library -- without the PHP extension

531175.4k4](/packages/directorytree-imapengine)

PHPackages © 2026

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