- PHP >= 7.0
composer require javanile/php-imap2:dev-acmark
$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
- Outlook Demo - COMING SOON
- https://www.atmail.com/blog/imap-commands/
- https://developers.google.com/gmail/imap/xoauth2-protocol
- ddeboer/imap#443 (comment)
- added support for flags in imap2_fetch_overview() (FT_PEEK, FT_UID) - overview will not set all mail as read