Retrieve messages from an IMAP server
$imap = new Imap();
$connection_result = $imap->connect('{imap.gmail.com:993/imap/ssl}INBOX', 'user@gmail.com', 'password');
if ($connection_result !== true) {
echo $connection_result; //Error message!
exit;
}
$messages = $imap->getMessages('text'); //Array of messages
If this project help you reduce time to develop, you can give me a cup of coffee to continue its development. Thank you! :)