outlook.office365.com different function issue
venkatesh-php opened this issue · 9 comments
outlook.office365.com host not giving proper result while using unseen(), whereSince(), and whereOn() function.Its working all() function only
I can confirm that I am having the same issue
Hi @venkatesh-php ,
could you please specify "not giving proper result"? :)
Best regards
Hi @Webklex
The Query return empty results while using unseen(), whereSince(), and whereOn().
Thank you for your Response.
Hi @venkatesh-php ,
please share some code - specially the part where you build your search query.
Best regards
hi @Webklex
Here is the sample code
use Webklex\IMAP\Client;
$oClient = new Client([
'host' => outlook.office365.com,
'port' => 993,
'encryption' => 'ssl',
'validate_cert' => true,
'username' => userName,
'password' => Password,
'protocol' => 'imap'
]);
$oClient->connect();
$aFolder = $oClient->getFolder('INBOX');
$aMessage = $aFolder->query()->unseen()->markAsRead()->get();
or
$aMessage = $aFolder->query()->whereSince()->markAsRead()->get();
or
$aMessage = $aFolder->query()->whereOn()->markAsRead()->get();
$aMessage is giving empty results.
$aMessage = $oFolder->messages()->all()->get();
working fine.
Thank You
Hi @venkatesh-php ,
what happens if you parse query() a null
?
$aMessage = $aFolder->query(null)->whereOn()->markAsRead()->get();
Did you updated to the latest version 1.4.0?
Best regards
Hi @Webklex
Thank you so much, its working in above all functions.
currently i'm using 1.2.9 version. i'll update now.
Thank you.
Hi @venkatesh-php ,
thats great :)
Save my day. Thx a alot! :)