Connection to IMAP servers fails

Hello!
I am not sure of this is a bug or a configuration issue, but I have problems connecting SuiteCRM (version 8.7.0) with Office 365 email accounts. OAuth configuration works, but all access to email folders show no result. The logs contain these errors:

[Wed Oct 09 14:33:36.825879 2024] [php:warn] [pid 4192254:tid 4192254] [client a.b.c.d:49345] PHP Warning:  open(): Couldn't open stream {outlook.office365.com:993/service=imap}INBOX in /var/www/html/public/legacy/modules/InboundEmail/InboundEmail.php on line 6593. Source code in /var/www/html/vendor/javanile/php-imap2/src/Connection.php on line 81, referer: https://suitecrm.example. net/legacy/index.php?return_module=Emails&return_action=DetailView&module=Emails&action=index

The error PHP Warning: open(): Couldn’t open stream appears with other IMAP servers as well (testing platforms, self-signed certificate, “regular” certificate). Debugging shows that the TCP connection works, TLS maybe, but no IMAP commands go through the stream. Does anyone else have this problem?

Best regards,
René.

Did you do this?

  • To enable IMAP access for an Office 365 account, you can do the following:
  1. Log in to the Exchange admin center using your Microsoft admin account
  2. Select Recipients, then Mailboxes
  3. Choose the mailbox you want to enable IMAP for
  4. Click Manage email apps settings in the General tab
  5. Enable IMAP and click Save
1 Like

Yes, the Office 365 part is completely configured. It’s just that the TLS connections fails. SuiteCRM doesn’t even get to the point of talking to Office 365. I double-checked TLS verification and other TLS settings. The system certifcate authorities works for verifying the trust chain, only the IMAP open call from the PHP modules does not work. Is this a know problem?

Best regards,
René.

I’m not sure what your specific problem is, but I’ve configured it on multiple installations and there are no bugs that I’ve run into.