Cannot Select Folders in Inbound Mail Settings - undefined array ket

I am trying to setup an Online Microsoft365 Outlook account for SuiteCRM. I get this error when I want to select the monitored inbox folder.

Warning: open(): Couldn’t open stream {outlook.office365.com:993/service=imap/ssl/tls/validate-cert/secure}INBOX in C:\xampp\htdocs\SuiteCRM\public\legacy\modules\InboundEmail\InboundEmail.php on line 6597. Source code in C:\xampp\htdocs\SuiteCRM\vendor\javanile\php-imap2\src\Connection.php on line 81

Warning: Undefined array key ā€œfoldersListā€ in C:\xampp\htdocs\SuiteCRM\public\legacy\modules\InboundEmail\ShowInboundFoldersList.php on line 146

Login or Password Incorrect

Click the Shift key or the Ctrl key to select multiple folders.

Warning: Undefined variable $requestMailBox in C:\xampp\htdocs\SuiteCRM\public\legacy\modules\InboundEmail\ShowInboundFoldersList.php on line 248

Fatal error: Uncaught TypeError: implode(): Argument #1 ($array) must be of type array, string given in C:\xampp\htdocs\SuiteCRM\public\legacy\modules\InboundEmail\ShowInboundFoldersList.php:248 Stack trace: #0 C:\xampp\htdocs\SuiteCRM\public\legacy\modules\InboundEmail\ShowInboundFoldersList.php(248): implode(ā€˜,’, NULL) #1 C:\xampp\htdocs\SuiteCRM\public\legacy\include\MVC\View\SugarView.php(800): include_once(ā€˜C:\xampp\htdocs…’) #2 C:\xampp\htdocs\SuiteCRM\public\legacy\include\MVC\View\views\view.classic.php(72): SugarView->includeClassicFile(ā€˜modules/Inbound…’) #3 C:\xampp\htdocs\SuiteCRM\public\legacy\include\MVC\View\SugarView.php(210): ViewClassic->display() #4 C:\xampp\htdocs\SuiteCRM\public\legacy\include\MVC\Controller\SugarController.php(443): SugarView->process() #5 C:\xampp\htdocs\SuiteCRM\public\legacy\include\MVC\Controller\SugarController.php(374): SugarController->processView() #6 C:\xampp\htdocs\SuiteCRM\public\legacy\include\MVC\SugarApplication.php(101): SugarController->execute() #7 C:\xampp\htdocs\SuiteCRM\public\legacy\index.php(52): SugarApplication->execute() #8 {main} thrown in C:\xampp\htdocs\SuiteCRM\public\legacy\modules\InboundEmail\ShowInboundFoldersList.php on line 248

Please Help

Make sure you downloaded IMAP package for your PHP version.


  • Go to the Microsoft 365 Admin Center → Users → Active users → [select the mailbox].
  • Open the Mail tab → Manage email apps.
  • Ensure IMAP is checked (enabled).

Check under:
Exchange Admin Center → Mailboxes → Mail flow settings → Manage email apps
Make sure ā€œAuthenticated SMTPā€ is enabled for the account.


Setting Value
Mail Server Name outlook.office365.com
Mail Server Protocol IMAP
Port 993
Use SSL :white_check_mark:
Username Full email address (e.g. user@domain.com)
Password (Use App Password if MFA is on)

In your php.ini:

extension=imap
extension=openssl

Restart Apache2 or nginx.