javanile / php-imap2

PHP IMAP with OAUTH2
https://php-imap2.javanile.org/
GNU General Public License v3.0
48 stars 28 forks source link
email imap oauth2 php
# ⭐ Give me a star, please! ⭐

![PHP IMAP2](docs/logo.png) # 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

Install

composer require javanile/php-imap2

or

Download latest release

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

Scope: https://mail.google.com/

Sandbox

Contributors

Other links

Reference

Microsoft Outlook

IMAP & OAUTH