laravel-imap
laravel-imap copied to clipboard
$message = $folder->query()->get()->first(); returning null
I am integrating Webklex for receiving emails in laravel. I am able to build connection but message returning null
code -> $oClient = \Webklex\IMAP\Facades\Client::account('default'); $connect =$oClient->connect(); $folder = $oClient->getFolder('INBOX'); $message = $folder->query()->get()->first(); dd( $message);
Hi @makedreams45 , it looks like you aren't providing any criteria. Try something like this:
$message = $folder->query()->all()->get()->first();
Checkout https://www.php-imap.com/api/query for more query and usage examples :)
Best regards,
Thanks, can I ask you for extra help? You provided me APIs of PHP-IMAP. is APIs are different for PHP-imap and laravel-imap? if different , can you provide same for laravel-imap?