ImapHandler Errors: How to setup Inbound Email for office365? v7.12.5

Hi,
I have ā€˜Email Settingsā€™ and ā€˜Outbound Emailā€™ working correctly using the smtp.office365.com server with TLS. However ā€˜Inbound Emailā€™ will not work ( i have the imap module installed and imap enabled on office365, with my domain added ).

If i donā€™t click ā€˜use SSLā€™ in the Admin>Inbound Email settings page, i get the following error:-

TLS/SSL failure for outlook.office365.com: SSL negotiation failed*
Please check your settings and try again.*

But if i select SSL, i get the error:-

Login or Password Incorrect

The settings page will not let me save the SSL as true and gives the error:

No optimums were saved with your inbound email account, Please review the settings


[1][DEBUG] ---------------STARTING FINDOPTIMUMS LOOP----------------
[1][DEBUG] 1: I-E testing string: {outlook.office365.com:993/service=imap/ssl/tls/validate-cert/secure}INBOX
[1][ERROR] ImapHandler trying to set a non valid resource az stream.
[1][ERROR] ImapHandler trying to use a non valid resource stream.
[1][WARN] An Imap error detected: "IMAP open error"
[1][ERROR] ImapHandler trying to use a non valid resource stream.
[1][ERROR] ImapHandler trying to use a non valid resource stream.
[1][ERROR] ImapHandler trying to set a non valid resource az stream.
[1][ERROR] ImapHandler trying to use a non valid resource stream.
[1][WARN] An Imap error detected: "IMAP open error"
[1][ERROR] ImapHandler trying to use a non valid resource stream.
[1][ERROR] ImapHandler trying to use a non valid resource stream.
[1][ERROR] ImapHandler trying to set a non valid resource az stream.
[1][ERROR] ImapHandler trying to use a non valid resource stream.
[1][WARN] An Imap error detected: "IMAP open error"
[1][ERROR] ImapHandler trying to use a non valid resource stream.
[1][ERROR] ImapHandler trying to use a non valid resource stream.
[1][WARN] An Imap error detected: "Can't open mailbox {outlook.office365.com:993\/service=imap\/ssl\/tls\/validate-cert\/secure}INBOX: invalid remote specification"
[1][DEBUG] 1: I-E failed using [{outlook.office365.com:993/service=imap/ssl/tls/validate-cert/secure}INBOX] - error: Can't open mailbox {outlook.office365.com:993/service=imap/ssl/tls/validate-cert/secure}INBOX: invalid remote specification
[1][ERROR] ImapHandler trying to use a non valid resource stream.
[1][DEBUG] 1: I-E clearing error and alert stacks.
[1][WARN] An Imap error detected: "Can't open mailbox {outlook.office365.com:993\/service=imap\/ssl\/tls\/validate-cert\/secure}INBOX: invalid remote specification"
[1][WARN] An Imap error detected: "Can't open mailbox {outlook.office365.com:993\/service=imap\/ssl\/tls\/validate-cert\/secure}INBOX: invalid remote specification"
[1][WARN] An Imap error detected: "Can't open mailbox {outlook.office365.com:993\/service=imap\/ssl\/tls\/validate-cert\/secure}INBOX: invalid remote specification"
[1][DEBUG] 2: I-E testing string: {outlook.office365.com:993/service=imap/ssl/tls/validate-cert}INBOX

What does ImapHandler trying to set a non valid resource az stream. mean?
Presumably suitecrm works ok with office365? I know that i have had issues with other applications due to MFA settings, but they are currently disabled.

Microsoft changed requirements recently. There have been many recent threads about this. SuiteCRM v7.13 is the version that fixes Microsoft email accounts.

Thanks pgr,

Iā€™m going around in circles here.

Having struggled with a number of issues, i finally migrated to 8.2, but still had problems with subpanels. I decided to roll back and ensure i had a fully functioning 7.12.5 before migrating, hoping i could finally make the switch :frowning:

As cicciobello pointed out in this post , there isnā€™t a supported upgrade path from 7.13 to 8.2. So how are people making the move?

Would the email requirements be fixed in 8.2 if i had 7.12.5 in the legacy folder?

:point_up: I expect this will eventually exist, I donā€™t see why not.

If youā€™re looking for stability and solving problems, I would stay on the v7 branch for now. My advice for v8 is quite simple: do try it and test it, but donā€™t make any assumptions. Test every single functionality you need thoroughly.

The convenience of moving to v8 really depends on which parts of the CRM you use, and to what extent those have been developed in v8, not on assumptions like ā€œI have email problems and I hope these are solved in v8ā€.

thanks pgr,
I was trying to test the migration to 8.2 to see how the customisations would work out with my data - rather than try on the demo version.

In the process i got completely muddled in backups and version control etc. :frowning:

have managed to get everything working again on 7.13, except for setting up the ms email connector, so will work on just getting that resolved.

1 Like

seem to have the same problem on a new install of 7.13 , but cant figure what Iā€™m doing wrong?

Admin>Email settings works ok - test email sent and recieved.

Admin>Outbound Email works only when i enter the password just before clicking test - otherwise an authentication error is thrown - Password is actually being saved to the database though.

Admin> External OAuth Provider seems to work and is set up as explained hereā€¦ EXTERNAL OAUTH PROVIDER

Admin> External OAuth Connection also seems to work and iā€™m retrieving an access token and refresh token when i click authenticate.

Admin> Inbound Email
The listview does not display unless i comment out line 515 in include/ListView/ListViewData.php and when trying to setup a Personal Inbound Email Account, the OAuth connection popup is blank, however i can set it manually by typing into the input box.

However when setting the monitored folders a popup title appears and disappears instantly. I rolled back to php 7.4, and now this popup stays visible ā€˜Select Subscribed Foldersā€™ but has ā€˜Login or Password Incorrectā€™

There is nowhere to enter a password on the Personal Inbound Email page, so i assume the problem is related to the same issue i have with the password on the Admin>Outbound Email settings?

Sorry, I donā€™t use Office email accounts myself, I donā€™t really know much about the specificities of this. And I havenā€™t tried the new 7.13 version yet.

I suppose youā€™re getting some bug in the new UIā€¦

no probs, and thanks. Iā€™ve added it as an issue on github,

1 Like

Giving this one a bump here. Iā€™m having the exact same issue. Creating the external oAuth goes well, no problem, but when creating the personal inbound email account I get ā€œLogin or Password Incorrectā€ and not sure how they can be? The login is the email address and there is no password field? Iā€™m assuming itā€™s using the oAuth key? Does anyone have this working with 0365? Any tips on how to get this working? (13.1 BTW)

Hey Paul!

I have a suggested fix for this on SuiteCRM-Core. I was experiencing the same problem. After ensuring IMAP was enabled with office365, and having OATH - I was still getting errorsā€¦ but it started with ā€œLogin or Password Incorrectā€.

Iā€™m not sure how well the PR will be received (It is my first ever PR, not just on github).

2 Likes