PHP-IMAP is a wrapper for common IMAP communication without the need to have the php-imap module installed / enabled. The protocol is completely integrated and therefore supports IMAP IDLE operation and the "new" oAuth authentication process as well.
Simple code from example:
$message->getHTMLBody() return html with message headers.
Desktop / Server (please complete the following information):
Sometims it happens with $message->getTextBody()