Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

outlook.office365.com different function issue #189

Closed
venkatesh-php opened this issue Jan 9, 2019 · 9 comments
Closed

outlook.office365.com different function issue #189

venkatesh-php opened this issue Jan 9, 2019 · 9 comments
Labels

Comments

@venkatesh-php
Copy link

outlook.office365.com host not giving proper result while using unseen(), whereSince(), and whereOn() function.Its working all() function only

@dbronson4672
Copy link

I can confirm that I am having the same issue

@Webklex
Copy link
Owner

Webklex commented Mar 10, 2019

Hi @venkatesh-php ,
could you please specify "not giving proper result"? :)

Best regards

@venkatesh-php
Copy link
Author

Hi @Webklex
The Query return empty results while using unseen(), whereSince(), and whereOn().

Thank you for your Response.

@Webklex
Copy link
Owner

Webklex commented Mar 15, 2019

Hi @venkatesh-php ,
please share some code - specially the part where you build your search query.

Best regards

@venkatesh-php
Copy link
Author

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

@Webklex
Copy link
Owner

Webklex commented Mar 19, 2019

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

@venkatesh-php
Copy link
Author

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.

@Webklex
Copy link
Owner

Webklex commented Mar 20, 2019

Hi @venkatesh-php ,
thats great :)

@udibagas
Copy link

Save my day. Thx a alot! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants