PHPackages                             kemo-php-imap/kemo-php-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. kemo-php-imap/kemo-php-imap

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

kemo-php-imap/kemo-php-imap
===========================

PHP class to access IMAP mailbox

2.0.9(9y ago)020BSD 3-ClausePHPPHP &gt;=5.3.0

Since Apr 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/kenmoini/kemo-php-imap)[ Packagist](https://packagist.org/packages/kemo-php-imap/kemo-php-imap)[ Docs](https://github.com/kenmoini/kemo-php-imap/)[ RSS](/packages/kemo-php-imap-kemo-php-imap/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (13)Used By (0)

PHP IMAP
========

[](#php-imap)

[![Author](https://camo.githubusercontent.com/4b81bec933f43fab610c74b67d809df76ecdf2c720e75cdb39afcb6f966b9fb2/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d406b656e6d6f696e692d626c75652e7376673f7374796c653d666c61742d737175617265)](https://www.kenmoini.com)[![GitHub release](https://camo.githubusercontent.com/9786a6c407d2fd3ac27d2a58a9f103cf986fb8a6704ef46d2108b64a9d7853b1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f62617262757368696e2f7068702d696d61702e7376673f6d61784167653d3836343030267374796c653d666c61742d737175617265)](https://packagist.org/packages/php-console/php-console)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Packagist](https://camo.githubusercontent.com/1e618d085297a77d76366549f657899f4a518c5849e5b79c9877189927035467/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068702d696d61702f7068702d696d61702e7376673f6d61784167653d3836343030267374796c653d666c61742d737175617265)](https://packagist.org/packages/php-console/php-console)

### Features

[](#features)

- Connect to mailbox by POP3/IMAP/NNTP, using [imap\_open()](http://php.net/imap_open)
- Get mailbox status, usinge [imap\_check()](http://php.net/imap_check)
- Receive emails (+attachments, +html body images)
- Search emails by custom criteria, using [imap\_search()](http://php.net/imap_search)
- Change email status, using [imap\_setflag\_full()](http://php.net/imap_setflag_full)
- Delete email, using [imap\_delete()](http://php.net/imap_delete)

### Requirements

[](#requirements)

- IMAP extension must be present; so make sure this line is active in your php.ini: `extension=php_imap.dll`

### Installation by Composer

[](#installation-by-composer)

```
{
	"require": {
		"kemo-php-imap/kemo-php-imap": "~2.0"
	}
}

```

Or

```
$ composer require kemo-php-imap/kemo-php-imap ~2.0

```

### Migration from `v1.*` to `v2.*`

[](#migration-from-v1-to-v2)

Just add following code in the head of your script:

```
use KemoPhpImap\Mailbox as ImapMailbox;
use KemoPhpImap\IncomingMail;
use KemoPhpImap\IncomingMailAttachment;

```

### Usage example

[](#usage-example)

```
// 4. argument is the directory into which attachments are to be saved:
$mailbox = new KemoPhpImap\Mailbox('{imap.gmail.com:993/imap/ssl}INBOX', 'some@gmail.com', '*********', __DIR__);

// Read all messaged into an array:
$mailsIds = $mailbox->searchMailbox('ALL');
if(!$mailsIds) {
	die('Mailbox is empty');
}

// Get the first message and save its attachment(s) to disk:
$mail = $mailbox->getMail($mailsIds[0]);

var_dump($mail);
echo "\n\n\n\n\n";
var_dump($mail->getAttachments());
```

### Recommended

[](#recommended)

- Google Chrome extension [PHP Console](https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef)
- Google Chrome extension [JavaScript Errors Notifier](https://chrome.google.com/webstore/detail/javascript-errors-notifie/jafmfknfnkoekkdocjiaipcnmkklaajd)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 56.8% 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 ~53 days

Recently: every ~88 days

Total

12

Last Release

3455d ago

Major Versions

1.1 → 2.02015-04-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/d81ef244ccdd0cb12dc91a281d6413005e4c517ee54d9c9237dc1cd11c287e57?d=identicon)[kenmoini](/maintainers/kenmoini)

---

Top Contributors

[![barbushin](https://avatars.githubusercontent.com/u/683352?v=4)](https://github.com/barbushin "barbushin (88 commits)")[![kenmoini](https://avatars.githubusercontent.com/u/1857778?v=4)](https://github.com/kenmoini "kenmoini (16 commits)")[![ThomasLandauer](https://avatars.githubusercontent.com/u/1054469?v=4)](https://github.com/ThomasLandauer "ThomasLandauer (8 commits)")[![SRWieZ](https://avatars.githubusercontent.com/u/1408020?v=4)](https://github.com/SRWieZ "SRWieZ (8 commits)")[![stanma](https://avatars.githubusercontent.com/u/1821782?v=4)](https://github.com/stanma "stanma (5 commits)")[![JellyBellyDev](https://avatars.githubusercontent.com/u/190820?v=4)](https://github.com/JellyBellyDev "JellyBellyDev (4 commits)")[![dizzy7](https://avatars.githubusercontent.com/u/1052472?v=4)](https://github.com/dizzy7 "dizzy7 (3 commits)")[![Theaxiom](https://avatars.githubusercontent.com/u/57013?v=4)](https://github.com/Theaxiom "Theaxiom (2 commits)")[![jlsalvador](https://avatars.githubusercontent.com/u/1464850?v=4)](https://github.com/jlsalvador "jlsalvador (2 commits)")[![tomhorvat](https://avatars.githubusercontent.com/u/7021695?v=4)](https://github.com/tomhorvat "tomhorvat (2 commits)")[![pedrolopes10](https://avatars.githubusercontent.com/u/5683649?v=4)](https://github.com/pedrolopes10 "pedrolopes10 (2 commits)")[![georaldc](https://avatars.githubusercontent.com/u/286812?v=4)](https://github.com/georaldc "georaldc (2 commits)")[![1allen](https://avatars.githubusercontent.com/u/597599?v=4)](https://github.com/1allen "1allen (1 commits)")[![Tschitsch](https://avatars.githubusercontent.com/u/5574780?v=4)](https://github.com/Tschitsch "Tschitsch (1 commits)")[![christianasche](https://avatars.githubusercontent.com/u/9271074?v=4)](https://github.com/christianasche "christianasche (1 commits)")[![ektarum](https://avatars.githubusercontent.com/u/5079406?v=4)](https://github.com/ektarum "ektarum (1 commits)")[![goosehub](https://avatars.githubusercontent.com/u/8077694?v=4)](https://github.com/goosehub "goosehub (1 commits)")[![hexathos](https://avatars.githubusercontent.com/u/92624?v=4)](https://github.com/hexathos "hexathos (1 commits)")[![igor-khripun](https://avatars.githubusercontent.com/u/9419872?v=4)](https://github.com/igor-khripun "igor-khripun (1 commits)")[![mean-cj](https://avatars.githubusercontent.com/u/1191385?v=4)](https://github.com/mean-cj "mean-cj (1 commits)")

---

Tags

phpmailimap

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/kemo-php-imap-kemo-php-imap/health.svg)](https://phpackages.com/packages/kemo-php-imap-kemo-php-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)[henrique-borba/php-sieve-manager

A modern (started in 2022) PHP library for the ManageSieve protocol (RFC5804) to create/edit Sieve scripts (RFC5228). Used by Cypht Webmail.

23125.7k2](/packages/henrique-borba-php-sieve-manager)[benhall14/php-imap-reader

A PHP class that makes working with IMAP in PHP simple.

3516.6k](/packages/benhall14-php-imap-reader)

PHPackages © 2026

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