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

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

vajiral/php-imap-fetch
======================

A PHP IMAP Library

0.0.2(6y ago)014BSD-3-ClausePHPPHP &gt;=5.3.0

Since Jan 15Pushed 6y ago1 watchersCompare

[ Source](https://github.com/vajiralasantha/PHP-IMAP-Fetch)[ Packagist](https://packagist.org/packages/vajiral/php-imap-fetch)[ Docs](https://github.com/vajiralasantha/PHP-IMAP-Fetch)[ RSS](/packages/vajiral-php-imap-fetch/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

PHP IMAP Fetch
==============

[](#php-imap-fetch)

PHP IMAP Fetch is a library for reading email and attachments, primarily using the POP and IMAP protocols.

Installing
----------

[](#installing)

> N.b. A note on Ubuntu 14.04 (probably other Debian-based / Apt managed systems), the install of php5-imap does not enable the extension for CLI (possibly others as well), which can cause composer to report fetch requires `ext-imap`

```
sudo ln -s /etc/php5/mods-available/imap.ini /etc/php5/cli/conf.d/30-imap.ini
```

### Composer

[](#composer)

Installing Fetch can be done through a variety of methods, although Composer is recommended.

```
"require": {
  "vajiral/php-imap-fetch": "*"
}

```

Sample Usage
------------

[](#sample-usage)

This is just a simple code to show how to access messages by using Fetch. It uses Fetch own autoload, but it can (and should be, if applicable) replaced with the one generated by composer.

```
use BigV\ImapFetch\Server;
use BigV\ImapFetch\Message;

$server = new Server('imap.example.com', 993);
$server->setAuthentication('username', 'password');

/** @var Message[] $message */
$messages = $server->getMessages();

foreach ($messages as $message) {
    echo "Subject: {$message->getSubject()}", PHP_EOL;
    echo "Body: {$message->getMessageBody()}", PHP_EOL;
}
```

License
-------

[](#license)

Fetch is licensed under the BSD License. See the LICENSE file for details.

Originally taken from  and added couple of extra features that I needed. All credits go to the original owner.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

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 ~0 days

Total

2

Last Release

2308d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/416f09233fd4af0c36c153aa0aaf3d76156f89843c023b245020d446eedc4d62?d=identicon)[vajiral](/maintainers/vajiral)

---

Top Contributors

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

---

Tags

emailimappop3

### Embed Badge

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

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

###  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)[tedivm/fetch

A PHP IMAP Library

5061.2M8](/packages/tedivm-fetch)[ddeboer/imap

Object-oriented IMAP for PHP

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

PHP IMAP client

4365.5M14](/packages/webklex-php-imap)[benhall14/php-imap-reader

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

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

An IMAP Testing Suite

312.2k7](/packages/tedivm-dovecottesting)

PHPackages © 2026

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