PHPackages                             javanile/php-imap2 - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. javanile/php-imap2

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

javanile/php-imap2
==================

PHP IMAP with OAUTH2

0.1.10(3y ago)64227.0k↓16.4%39[43 issues](https://github.com/javanile/php-imap2/issues)[10 PRs](https://github.com/javanile/php-imap2/pulls)1MITPHPPHP &gt;=7.0CI failing

Since May 16Pushed 3mo ago10 watchersCompare

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

READMEChangelog (10)Dependencies (2)Versions (18)Used By (1)

[![](https://raw.githubusercontent.com/javanile/php-imap2/refs/heads/main/docs/banner.svg)](https://ko-fi.com/francescobianco/goal?g=10)

---

[![PHP IMAP2](docs/logo.png)](docs/logo.png)

PHP IMAP2
=========

[](#php-imap2)

[![Linter](https://github.com/javanile/php-imap2/actions/workflows/linter.yml/badge.svg)](https://github.com/javanile/php-imap2/actions/workflows/linter.yml)

Requirements
------------

[](#requirements)

- PHP &gt;= 7.0

Install
-------

[](#install)

```
composer require javanile/php-imap2
```

or

Download latest release

Usage
-----

[](#usage)

```
$mbh = imap2_open($server, $username, $token, OP_XOAUTH2);
if (! $mbh) {
    error_log(imap2_last_error());
    throw new \RuntimeException('Unable to open the INBOX');
}
```

Gmail OAuth2
------------

[](#gmail-oauth2)

Scope:

Sandbox
-------

[](#sandbox)

- [Gmail Demo](https://replit.com/@frabik/PHP-IMAP2-Google-Demo?v=1#main.php)
- Outlook Demo - **COMING SOON**

Contributors
------------

[](#contributors)

- [dicode-nl](https://github.com/dicode-nl)
- [glensc](https://github.com/glensc)
- [bago](https://github.com/bago)

Other links
-----------

[](#other-links)

-

Reference
---------

[](#reference)

### Microsoft Outlook

[](#microsoft-outlook)

-

### IMAP &amp; OAUTH

[](#imap--oauth)

-
-
- [ddeboer/imap#443 (comment)](https://github.com/ddeboer/imap/issues/443#issuecomment-1172158902)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance42

Moderate activity, may be stable

Popularity50

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.2% 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 ~16 days

Recently: every ~27 days

Total

11

Last Release

1301d ago

### Community

Maintainers

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

---

Top Contributors

[![francescobianco](https://avatars.githubusercontent.com/u/472171?v=4)](https://github.com/francescobianco "francescobianco (253 commits)")[![dicode-nl](https://avatars.githubusercontent.com/u/4663575?v=4)](https://github.com/dicode-nl "dicode-nl (1 commits)")[![glensc](https://avatars.githubusercontent.com/u/199095?v=4)](https://github.com/glensc "glensc (1 commits)")

---

Tags

emailimapoauth2phpgoogleoauthoauth2microsoftexchangeimapgmailoutlook

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/javanile-php-imap2/health.svg)

```
[![Health](https://phpackages.com/badges/javanile-php-imap2/health.svg)](https://phpackages.com/packages/javanile-php-imap2)
```

###  Alternatives

[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2509.6M48](/packages/thenetworg-oauth2-azure)[stevenmaguire/oauth2-microsoft

Microsoft OAuth 2.0 Client Provider for The PHP League OAuth2-Client

742.3M12](/packages/stevenmaguire-oauth2-microsoft)[and/oauth

Simple and amazing OAuth library with many providers. Just try it out!

4645.2k2](/packages/and-oauth)

PHPackages © 2026

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