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

Outbound/Inbound Mail: Office365 SMTP Error: Could not authenticate. v7.13 #9899

Open
bunglex opened this issue Jan 14, 2023 · 14 comments
Open
Labels
Area: Emails:Config Issues & PRs related to email configuration Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Type: Bug Bugs within the core SuiteCRM codebase

Comments

@bunglex
Copy link

bunglex commented Jan 14, 2023

Issue

Can't set 'Outbound Email' or create 'Personal Outbound Email Account because authentication fails.

Expected Behavior

After setting up 'External OAuth Provider' and 'External OAuth Connector' and successfully retrieving an Access and Refresh Token, you should able to configure 'Outbound Email Settings' and setup a 'Personal Outbound Email Account', and also create inbound email account.

In the detail page for Personal Outbound Email Account , the 'send test email' should send test email when the correct settings are used.

Actual Behavior

In the detail page for Personal Outbound Email Account , the 'send test email' fails and returns an SMTP log that states

Authentication unsuccessful, the user credentials were incorrect.
SMTP Error: Could not authenticate.

SuiteCRm logs :

[FATAL] Using imap handler class: Imap2Handler
[FATAL] An Imap error detected: "IMAP open error: Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
[FATAL] An Imap error detected: "IMAP open error | debug data"
[FATAL] An Imap error detected: "ImapHandler:open: {outlook.office365.com:993\/service=imap\/ssl\/tls\/validate-cert\/secure}INBOX"
[FATAL] An Imap error detected: "ImapHandler:open: Info"
[FATAL] An Imap error detected: "ImapHandler:open: password is empty: no"
[FATAL] An Imap error detected: "ImapHandler:open: 512"
[FATAL] An Imap error detected: "IMAP open error | debug data end "
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] An Imap error detected: "IMAP open error:Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] An Imap error detected: "IMAP open error: Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
[FATAL] An Imap error detected: "IMAP open error | debug data"
[FATAL] An Imap error detected: "ImapHandler:open: {outlook.office365.com:993\/service=imap\/ssl\/tls\/validate-cert\/secure}INBOX"
[FATAL] An Imap error detected: "ImapHandler:open: Info"
[FATAL] An Imap error detected: "ImapHandler:open: password is empty: no"
[FATAL] An Imap error detected: "ImapHandler:open: 512"
[FATAL] An Imap error detected: "IMAP open error | debug data end "
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] An Imap error detected: "IMAP open error:Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] An Imap error detected: "IMAP open error: Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
[FATAL] An Imap error detected: "IMAP open error | debug data"
[FATAL] An Imap error detected: "ImapHandler:open: {outlook.office365.com:993\/service=imap\/ssl\/tls\/validate-cert\/secure}INBOX"
[FATAL] An Imap error detected: "ImapHandler:open: Info"
[FATAL] An Imap error detected: "ImapHandler:open: password is empty: no"
[FATAL] An Imap error detected: "ImapHandler:open: 512"
[FATAL] An Imap error detected: "IMAP open error | debug data end "
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] An Imap error detected: "IMAP open error:Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] ImapHandler trying to use a non valid resource stream.
[FATAL] An Imap error detected: "Can not authenticate to IMAP server: A0001 NO AUTHENTICATE failed."

However, if you re-enter the password 'after' opening the page, the test succeeds and the email is sent correctly.
forum post here

Possible Fix

unknown

Steps to Reproduce

  1. Log into SuiteCRM as admin
  2. Go to Admin > Outbound Email
  3. Create or select/edit a Personal Outbound Email Account
  4. Exchange Server: outlook.office365.com
  5. Mail SMTP/SLL: TLS
  6. Exchange Server Port: 587
  7. User SMTP Authentication: X
  8. Password: your O365 password
  9. Send Test email

Authentication fails and displays SMTP Log

  1. Enter Password again
  2. Send Test Email

Test passes and email is sent

Context

Can't setup an office365 outbound or inbound email account

Your Environment

  • SuiteCRM Version used: 7.13
  • Browser name and version : Chrome Version 109.0.5414.74 (64-bit)):
  • Environment name and version : Mysql8 PHP 7.4
  • Operating System and version: Ubuntu 20.04
@SuiteBot
Copy link

This issue has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/oauth-connection-for-inbound-emails/87421/5

@SuiteBot
Copy link

This issue has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/imaphandler-errors-how-to-setup-inbound-email-for-office365-v7-12-5/87565/8

@timo-ecm2
Copy link

Yes I have a similar issue, only I was specific busy with inbound email account.

@johnM2401 johnM2401 added Type: Bug Bugs within the core SuiteCRM codebase Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Area: Emails:Config Issues & PRs related to email configuration labels Jan 17, 2023
@greentreegroup
Copy link

we are also having issues connecting m365 to suitecrm when sending emails.

@timo-ecm2
Copy link

What about connecting to a gmail account, happens the same?

@bunglex
Copy link
Author

bunglex commented Jan 27, 2023

the password is saved and the email sent correctly when using a gmail account
?

@timo-ecm2
Copy link

timo-ecm2 commented Jan 30, 2023

ok thnx @bunglex for the information. Do you know where I can find a good manual / information for a gmail account

@Lehnerr
Copy link

Lehnerr commented Apr 14, 2023

I have the same issue, pls help

@pgorod
Copy link
Contributor

pgorod commented Apr 14, 2023

Does this still occur on the latest 7.13?

@Lehnerr
Copy link

Lehnerr commented Apr 14, 2023

yes 7.13.2

@SuiteBot
Copy link

This issue has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/email-setup-help-and-explanation/88999/2

@pstevens71
Copy link
Contributor

I suspect it might be this issue: there is a fix proposed and it works (I tested it).
https://github.com/salesagility/SuiteCRM/issues/9457

@chris001
Copy link
Contributor

@pstevens71 That link leads to a non existent page.... this is the one: #9457

@pstevens71
Copy link
Contributor

pstevens71 commented Jun 27, 2023

The previous #9457 doesn't seem to work for me on 7.13.3. I just cannot seem to authenticate outbound email.
I've tried ins sugarmailer.php to use the debugging to force the correct password and it works no problem. However, I cannot get test to work or after it's saved to work. I checked the DB and there are values in the password. Anyone know the password encryption? Is it MD5?

Also further info.... when using a gmail account with an app password, I can send a test and verify. However, the user cannot send with this account. (yes I have the option selected).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Emails:Config Issues & PRs related to email configuration Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Type: Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

9 participants