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
641 stars 182 forks source link

Folder List is empty when connection to Microsoft account #405

Closed crisleiria closed 3 years ago

crisleiria commented 3 years ago

Describe the bug I am trying to get all messages from inbox from Microsoft account. It connects successefuly but when I list all folders, list is empty. This is an brand new Microsoft account with default settings.

Webklex\PHPIMAP\Support\FolderCollection^ {#1133

total: null

items: []

}

This are my settings:

IMAP_HOST=outlook.office365.com IMAP_PORT=993 IMAP_ENCRYPTION=ssl IMAP_VALIDATE_CERT=true IMAP_USERNAME=email@mydomain.com IMAP_PASSWORD=mypassword IMAP_PROTOCOL=imap IMAP_AUTHENTICATION=xoauth2

To Reproduce Steps to reproduce the behavior:

  1. Have one laravel app
  2. Setting this on .env file with the above settings
  3. Connect to Email box with the following code

$oClient = Client::account('default'); $oClient->connect(); $aFolder = $oClient->getFolder('INBOX', true);

Expected behavior Fetch INBOX folder and retreive all emails.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop / Server (please complete the following information):

Additional context It connects OK, but no folders.

duykhoa87 commented 3 years ago

Anyone can help on this issue. I am facing the same here. Thanks

MariaLuize commented 3 years ago

I'm facing the same issue as well

Webklex commented 3 years ago

Hi @crisleiria @duykhoa87 @MariaLuize , many thanks for your report. Unfortunately this repository is not responsible for this behavior. Please head over to core repository webklex/php-imap and create a new issue under https://github.com/Webklex/php-imap/issues/new?assignees=&labels=&template=bug_report.md if the problem persists.

I'm not sure, but perhaps its related to https://github.com/Webklex/php-imap/issues/81 ? Please make sure to checkout the Outlook / Office 365 section under https://www.php-imap.com/examples/oauth as well.

Best regards,