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

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

Open
SuryaJD opened this issue Mar 16, 2023 · 3 comments
Open

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

SuryaJD opened this issue Mar 16, 2023 · 3 comments

Comments

@SuryaJD
Copy link

SuryaJD commented Mar 16, 2023

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

  • OS: Windows 11 (Local), Ubuntu 20 (Production)
  • PHP: 8.1.0 and 7.4.3 (Local), 7.4.3 (Production)
  • Version: 2.4.0
@seuntech
Copy link

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

@MouMoutMan
Copy link

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

@SuryaJD
Copy link
Author

SuryaJD commented Jul 18, 2023

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

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

No branches or pull requests

3 participants