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 office 365 queries do not return emails #316

Closed
alexv96 opened this issue Jul 28, 2020 · 3 comments
Closed

Outlook office 365 queries do not return emails #316

alexv96 opened this issue Jul 28, 2020 · 3 comments
Labels

Comments

@alexv96
Copy link

alexv96 commented Jul 28, 2020

I work with outlook office emails. The thing is that I want to bring only the emails from the last 5 days, but I don't get anything back.

If I use this line they bring me the data.

$aMessage = $aFolder->query()->limit(10)->get(); //return the data

But if I use this query it doesn't bring me anything.

$aMessage = $aFolder->query()->since(Carbon::now()->subDays(5))->get(); //This line not return the data 

        foreach ($aMessage as $oMessage) {
            echo 'ID: '. $oMessage->getUid() ."\n";
            echo $oMessage->getSubject() .' | The date of the mail is from : '. $oMessage->getDate() . "\n";
        }
@yusufonur
Copy link

I am using Laravel 7 and I am suffering from this problem too.
I review a few issue and #189 this but not find solution.

@alexv96
Copy link
Author

alexv96 commented Aug 14, 2020

I am using Laravel 7 and I am suffering from this problem too.
I review a few issue and #189 this but not find solution.

While it has worked for me by placing a limit on the query to searches by date.

$aFolder->query(null)->since(Carbon::now()->subDays(30)->format('d-m-Y'))->limit(50)->get();

@yusufonur
Copy link

I am using Laravel 7 and I am suffering from this problem too.
I review a few issue and #189 this but not find solution.

While it has worked for me by placing a limit on the query to searches by date.

$aFolder->query(null)->since(Carbon::now()->subDays(30)->format('d-m-Y'))->limit(50)->get();

Very interesting. If we don't add null parameter to the chained method named query, it doesn't work. I gues default value utf-8 causes error

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

3 participants