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

Microsoft 365 SMTP could not authenticate in SuiteCRM #9371

Open
hitechparadigm opened this issue Nov 20, 2021 · 5 comments
Open

Microsoft 365 SMTP could not authenticate in SuiteCRM #9371

hitechparadigm opened this issue Nov 20, 2021 · 5 comments
Labels
Area: Emails Issues & PRs related to all things regarding emails & email module Type:Discussion Issues & PRs related to ongoing discussions

Comments

@hitechparadigm
Copy link

hitechparadigm commented Nov 20, 2021

Issue

Office365 SMTP settings cannot authenticate in SuiteCRM.

When I try to configure the default outgoing mail server for sending email notifications using Microsoft 365 smtp.office365, port 587, SuiteCRM gives me SMTP Error: Could not authenticate.

Here is the log

3: Connection: opened
2: SERVER → CLIENT: 220 BL1P222CA0017.outlook.office365.com Microsoft ESMTP MAIL Service ready at Sat, 20 Nov 2021 02:56:36 +0000

1: CLIENT → SERVER: EHLO 54.90.134.19

2: SERVER → CLIENT: 250-BL1P222CA0017.outlook.office365.com Hello [54.90.134.19]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8

1: CLIENT → SERVER: STARTTLS

2: SERVER → CLIENT: 220 2.0.0 SMTP server ready

1: CLIENT → SERVER: EHLO 54.90.134.19

2: SERVER → CLIENT: 250-BL1P222CA0017.outlook.office365.com Hello [54.90.134.19]
250-SIZE 157286400
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-AUTH LOGIN XOAUTH2
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250 SMTPUTF8

1: CLIENT → SERVER: AUTH LOGIN

2: SERVER → CLIENT: 334 VXNlcm5hbWU6

1: CLIENT → SERVER: —obfuscated—
2: SERVER → CLIENT: 334 UGFzc3dvcmQ6

1: CLIENT → SERVER: —obfuscated—
2: SERVER → CLIENT: 535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit https://aka.ms/smtp_auth_disabled for more information. [BL1P222CA0017.NAMP222.PROD.OUTLOOK.COM]

1: SMTP ERROR: Password command failed: 535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit https://aka.ms/smtp_auth_disabled for more information. [BL1P222CA0017.NAMP222.PROD.OUTLOOK.COM]

3: SMTP Error: Could not authenticate.
1: CLIENT → SERVER: QUIT

2: SERVER → CLIENT: 221 2.0.0 Service closing transmission channel

3: Connection: closed
3: SMTP Error: Could not authenticate.

Expected Behavior

I want to be able to configure SuiteCRM outbound email using the Office 365 SMTP settings:
server: smtp.office365.com
port: 587 (SSL/TLS)

Actual Behavior

Every time I try to send a test email, I get this error:
SMTP Error: Could not authenticate

Possible Fix

Have no idea.

Steps to Reproduce

  1. Log into SuiteCRM as admin
  2. Go to Admin > Email Settings
  3. Exchange Server: smtp.office365.com
  4. Exchange Server Port: 587
  5. Enable SMTP over SSL or TSL: TLS
  6. User SMTP Authentication: X
  7. Exchange Username: your office 365 username@domain.com
  8. Exchange Password: your O365 password

Context

As a lot of corporate clients use O365, it is critical to have the issue resolved.

Your Environment

  • SuiteCRM Version used: 7.12.0-11-r01 on Debian 10
  • Browser name and version: Version 96.0.4664.45 (Official Build) (64-bit)
  • Environment name and version (e.g. MySQL, PHP 7): Amazon Machine Image by Bitnami by VMware
  • Operating System and version (e.g Ubuntu 16.04): Linux/Unix, Debian 10
@johnM2401 johnM2401 added Area: Emails Issues & PRs related to all things regarding emails & email module Status:Requires Updates Issues & PRs which requires input or update from the author labels Nov 25, 2021
@johnM2401
Copy link
Contributor

Hey,

I haven't used Office365 myself, I'm afraid, but I have had a look around for those error messages.
I've found some threads online wherein others have noted this issue with other applications

Perhaps some of the steps here can assist?:

This thread mentions enabling/using App Passwords for Office365:
https://stackoverflow.com/questions/24947434/setting-up-phpmailer-with-office365-smtp

This thread here mentions modifying the Security options for Legacy Auth/Azure:
https://docs.microsoft.com/en-us/answers/questions/512954/535-57139-authentication-unsuccessful.html

This thread mentions enabling "Authenticated SMTP" in your Office 365 Admin panel:
https://stackoverflow.com/questions/50365644/cant-connect-to-office365-smtp-via-phpmailer

Does anything above lead you to a solution?
Please let us know if you are still having issues!

@tsmgeek
Copy link
Contributor

tsmgeek commented Nov 26, 2021

Not directly an issue with SuiteCRM, your O365 tenant has SMTP auth disabled. You can either get it enabled or use a 3rd party SMTP service such as Sendgrid, Amazon SES etc as many of them support SMTP plain text auth.

We have a similar ticket for Gsuite deprecation of SMTP plain auth #8791.

535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit https://aka.ms/smtp_auth_disabled for more information.

@Mac-Rae Mac-Rae added Type:Discussion Issues & PRs related to ongoing discussions and removed Status:Requires Updates Issues & PRs which requires input or update from the author labels Nov 26, 2021
@andresgarcia0313
Copy link

Tengo el mismo problema con gmail and O365

@andresgarcia0313
Copy link

I have the same problem with gmail and o365

@andresgarcia0313
Copy link

solved with google when creating an application password https://support.google.com/accounts/answer/185833?hl=es but not with office because it no longer allows creating an application password now it asks to create MFA authentication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Emails Issues & PRs related to all things regarding emails & email module Type:Discussion Issues & PRs related to ongoing discussions
Projects
None yet
Development

No branches or pull requests

5 participants