Webklex / laravel-imap

Laravel IMAP is an easy way to integrate both the native php-imap module and an extended custom imap protocol into your Laravel app.
https://www.php-imap.com
MIT License
617 stars 177 forks source link

Can't search within text from Office 365 Mail #467

Open SuryaJD opened 1 year ago

SuryaJD commented 1 year ago

Describe the bug I am using this package to search email containing specific text within Office 365. I am using the same code for Gmail as well. But search functionality is working fine there. So, the problem should be with Office 365. May I miss anything.

To Reproduce

  1. Connect Office 365 using IMAP
  2. Search into inbox folder using text($string) method.
  3. Or use Where() Method
        $inbox->query()->where([
            ['KEYWORD' => 'Hello'],
            ['TEXT' => 'Hello']
        ])->get()->each(function ($message) use ($jd) {
            if ($message->hasTextBody()) {
                dump($message->getAttributes());
            }else {
                dump($message->getSubject());
            } 
        });

Expected behavior I should get the collection of emails containing those words. but currently an empty array is returning.

Desktop / Server

seuntech commented 1 year ago

can you please share how you are able to use imap on office 365

MouMoutMan commented 1 year ago

@SuryaJD , can you describe how to use imap on office365 plz ! :D

SuryaJD commented 11 months ago

@SuryaJD , can you describe how to use imap on office365 plz ! :D https://www.php-imap.com/examples/oauth