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)65260.6k↓38.7%40[40 issues](https://github.com/javanile/php-imap2/issues)[3 PRs](https://github.com/javanile/php-imap2/pulls)1MITPHPPHP &gt;=7.0CI failing

Since May 16Pushed 1mo ago11 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 develop Synced 2d ago

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

⭐ Give me a star, please! ⭐
===========================

[](#-give-me-a-star-please-)

[![](https://raw.githubusercontent.com/francescobianco/gif/main/images/give-stars-h192.gif)](https://raw.githubusercontent.com/francescobianco/gif/main/images/give-stars-h192.gif)[![](https://raw.githubusercontent.com/francescobianco/gif/main/images/push-button-h192.gif)](https://raw.githubusercontent.com/francescobianco/gif/main/images/push-button-h192.gif)

---

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

[](#php-imap2)

Modern IMAP extension wrapper for PHP with OAuth2 support.

[![Linter](https://github.com/javanile/php-imap2/actions/workflows/linter.yml/badge.svg)](https://github.com/javanile/php-imap2/actions/workflows/linter.yml)[![License](https://camo.githubusercontent.com/cf6864579356b3be253d4e243d1e9f2e2d0818d4c080b2b1dac826afbc7c9972/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6176616e696c652f7068702d696d617032)](LICENSE)[![PHP Version](https://camo.githubusercontent.com/57fcd13883830eb45aa07e447c61cced9040d09ef07b992d4bf608ae59b7b40d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e302d3737374242342e737667)](https://www.php.net/)[![Packagist](https://camo.githubusercontent.com/6b7b459c7aaea120db2ec6ca7de52325c5dc0df022e6521e0a502d4d61f98eb2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6176616e696c652f7068702d696d617032)](https://packagist.org/packages/javanile/php-imap2)

---

Overview
--------

[](#overview)

`php-imap2` provides a lightweight and modern interface for working with IMAP mailboxes in PHP, including OAuth2 authentication support for providers like Gmail and Outlook.

Designed as a simple drop-in alternative for projects that need secure IMAP access without legacy authentication.

---

Features
--------

[](#features)

- OAuth2 authentication support
- Gmail IMAP integration
- Outlook / Microsoft 365 support
- Lightweight API
- Compatible with native PHP IMAP workflows
- Easy integration into existing projects

---

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

[](#requirements)

- PHP &gt;= 7.0
- PHP IMAP extension enabled

---

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

[](#installation)

Install via Composer:

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

Or download the latest release from GitHub.

---

Quick Start
-----------

[](#quick-start)

```
