- PHP >= 7.0
composer require javanile/php-imap2
or
Download latest release
$mbh = imap2_open($server, $username, $token, OP_XOAUTH2);
if (! $mbh) {
error_log(imap2_last_error());
throw new \RuntimeException('Unable to open the INBOX');
}
Scope: https://mail.google.com/
- Gmail Demo - https://phpsandbox.io/e/x/zwauf?layout=EditorPreview&defaultPath=%2F&theme=dark&showExplorer=no&openedFiles=
- Outlook Demo - COMING SOON