Office 365 SMTP authentication failing, even with correct account information

Anonymous
2020-02-10T16:38:43+00:00

On my Wordpress site I've run into a problem in the last day or so, where emails simply fail to send. Before today it was running flawlessly for two months. The account information/password/username etc have not changed in that two months.

I'm using a Wordpress plugin called WP Mail SMTP to facilitate the sending of all outgoing emails. The error log I'm getting from the email test on that is as follows:

Versions:

WordPress: 5.3.2

WordPress MS: No

PHP: 7.3.14-5+0~20200202.52+debian9~1.gbpa71879

WP Mail SMTP: 1.8.1

Params:

Mailer: smtp

Constants: No

ErrorInfo: SMTP Error: Could not authenticate.

Host: smtp.office365.com

Port: 587

SMTPSecure: tls

SMTPAutoTLS: bool(true)

SMTPAuth: bool(true)

Server:

OpenSSL: OpenSSL 1.1.1d 10 Sep 2019

SMTP Debug:

2020-02-10 16:36:56 Connection: opening to smtp.office365.com:587, timeout=300, options=array ()

2020-02-10 16:36:56 Connection: opened

2020-02-10 16:36:56 SERVER -> CLIENT: 220 LNXP123CA0008.outlook.office365.com Microsoft ESMTP MAIL Service ready at Mon, 10 Feb 2020 16:36:55 +0000

2020-02-10 16:36:56 CLIENT -> SERVER: EHLO www.*****.com

2020-02-10 16:36:56 SERVER -> CLIENT: 250-LNXP123CA0008.outlook.office365.com Hello [***]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8

2020-02-10 16:36:56 CLIENT -> SERVER: STARTTLS

2020-02-10 16:36:56 SERVER -> CLIENT: 220 2.0.0 SMTP server ready

2020-02-10 16:36:56 CLIENT -> SERVER: EHLO www.zestpromotional.com

2020-02-10 16:36:56 SERVER -> CLIENT: 250-LNXP123CA0008.outlook.office365.com Hello [***]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-AUTH LOGIN XOAUTH2250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8

2020-02-10 16:36:56 CLIENT -> SERVER: AUTH LOGIN

2020-02-10 16:36:56 SERVER -> CLIENT: 334 VXNlcm5hbWU6

2020-02-10 16:36:56 CLIENT -> SERVER: c2FsZXNAemVzdHByb21vdGlvbmFsLmNvbQ==

2020-02-10 16:36:56 SERVER -> CLIENT: 334 UGFzc3dvcmQ6

2020-02-10 16:36:56 CLIENT -> SERVER: QmFkMzM4MzA=

2020-02-10 16:37:02 SERVER -> CLIENT: 535 5.7.3 Authentication unsuccessful [LNXP123CA0008.GBRP123.PROD.OUTLOOK.COM]

2020-02-10 16:37:02 SMTP ERROR: Password command failed: 535 5.7.3 Authentication unsuccessful [LNXP123CA0008.GBRP123.PROD.OUTLOOK.COM]

SMTP Error: Could not authenticate.

2020-02-10 16:37:02 CLIENT -> SERVER: QUIT

2020-02-10 16:37:02 SERVER -> CLIENT: 221 2.0.0 Service closing transmission channel

2020-02-10 16:37:02 Connection: closed

SMTP Error: Could not authenticate.

Does anyone have any ideas at all? I'm completely at a loss here.

Microsoft 365 and Office | Subscription, account, billing | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

48 answers

Sort by: Most helpful
  1. Anonymous
    2020-09-26T21:51:21+00:00

    I don't believe that i post solution thatch work onmicrosoft.com only accept solution should be slc /scannowYou have to enable Authenticated SMTP then wait 3 minutes.Open the Microsoft 365 admin center and go to Users > Active users.

    Select the user, and in the flyout that appears, click Mail.
    
    In the Email apps section, click Manage email apps.
    
    Verify the Authenticated SMTP setting: unchecked = disabled, checked = enabled.
    
    When you're finished, click Save changes.
    

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2020-07-06T11:57:19+00:00

    Thanks for digging into this.

    It is frustrating as on the application development side, to get announcements like these https://techcommunity.microsoft.com/t5/exchange-team-blog/announcing-oauth-2-0-support-for-imap-and-smtp-auth-protocols-in/ba-p/1330432

    And then to move forward with implementation and getting customers through any friction with admin consent and then to discover that old accounts will respect the OAuth SMTP scope grant, but new ones won't because of this setting.

    From a consumer perspective, they've authorized it and in many cases an admin has granted approval for the application only to still have it not work for some hard to know reason (this setting).

    The OAuth grant should allow for SMTP, and at the least have a clear spot in azure admin to toggle SmtpClientAuthenticationDisable .

    As an application developer, I must say that the experience with conflicting, unclear documentation and the UX/UI of the admin portals have been the biggest challenge in interfacing with OAuth setup.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2020-06-22T17:44:35+00:00

    On my Wordpress site I've run into a problem in the last day or so, where emails simply fail to send. Before today it was running flawlessly for two months. The account information/password/username etc have not changed in that two months.

    I'm using a Wordpress plugin called WP Mail SMTP to facilitate the sending of all outgoing emails. The error log I'm getting from the email test on that is as follows:

    Versions:

    WordPress: 5.3.2

    WordPress MS: No

    PHP: 7.3.14-5+0~20200202.52+debian9~1.gbpa71879

    WP Mail SMTP: 1.8.1

    Params:

    Mailer: smtp

    Constants: No

    ErrorInfo: SMTP Error: Could not authenticate.

    Host: smtp.office365.com

    Port: 587

    SMTPSecure: tls

    SMTPAutoTLS: bool(true)

    SMTPAuth: bool(true)

    Server:

    OpenSSL: OpenSSL 1.1.1d 10 Sep 2019

    SMTP Debug:

    2020-02-10 16:36:56 Connection: opening to smtp.office365.com:587, timeout=300, options=array ()

    2020-02-10 16:36:56 Connection: opened

    2020-02-10 16:36:56 SERVER -> CLIENT: 220 LNXP123CA0008.outlook.office365.com Microsoft ESMTP MAIL Service ready at Mon, 10 Feb 2020 16:36:55 +0000

    2020-02-10 16:36:56 CLIENT -> SERVER: EHLO www.*****.com

    2020-02-10 16:36:56 SERVER -> CLIENT: 250-LNXP123CA0008.outlook.office365.com Hello [***]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-STARTTLS250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8

    2020-02-10 16:36:56 CLIENT -> SERVER: STARTTLS

    2020-02-10 16:36:56 SERVER -> CLIENT: 220 2.0.0 SMTP server ready

    2020-02-10 16:36:56 CLIENT -> SERVER: EHLO www.zestpromotional.com

    2020-02-10 16:36:56 SERVER -> CLIENT: 250-LNXP123CA0008.outlook.office365.com Hello [***]250-SIZE 157286400250-PIPELINING250-DSN250-ENHANCEDSTATUSCODES250-AUTH LOGIN XOAUTH2250-8BITMIME250-BINARYMIME250-CHUNKING250 SMTPUTF8

    2020-02-10 16:36:56 CLIENT -> SERVER: AUTH LOGIN

    2020-02-10 16:36:56 SERVER -> CLIENT: 334 VXNlcm5hbWU6

    2020-02-10 16:36:56 CLIENT -> SERVER: c2FsZXNAemVzdHByb21vdGlvbmFsLmNvbQ==

    2020-02-10 16:36:56 SERVER -> CLIENT: 334 UGFzc3dvcmQ6

    2020-02-10 16:36:56 CLIENT -> SERVER: QmFkMzM4MzA=

    2020-02-10 16:37:02 SERVER -> CLIENT: 535 5.7.3 Authentication unsuccessful [LNXP123CA0008.GBRP123.PROD.OUTLOOK.COM]

    2020-02-10 16:37:02 SMTP ERROR: Password command failed: 535 5.7.3 Authentication unsuccessful [LNXP123CA0008.GBRP123.PROD.OUTLOOK.COM]

    SMTP Error: Could not authenticate.

    2020-02-10 16:37:02 CLIENT -> SERVER: QUIT

    2020-02-10 16:37:02 SERVER -> CLIENT: 221 2.0.0 Service closing transmission channel

    2020-02-10 16:37:02 Connection: closed

    SMTP Error: Could not authenticate.

    Does anyone have any ideas at all? I'm completely at a loss here.

    I am experiencing the same issue.

    I tried setting up the Outlook Web App and Outlook Desktop and it works in both, yet when I try to send a test email from Wordpress or dotnet core I get the same error.

    Another thing I tried was using port 25 and didn't work either.

    The account has access to all mail apps:

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2020-06-11T16:34:48+00:00

    Yeah, can someone from Microsoft explain the issue here?

    I'm guessing the new Security defaults Microsoft imposed on every accounts changed something in the backend, but I'm no Azure Technician to figure it out. The thing is, whatever security firewall they have, an account without 2FA/MFA should still send SMTP with the correct credentials.

    @Microsoft, @Anna please respond.

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments
  5. Anonymous
    2020-05-29T23:25:50+00:00

    I'm having the same problem, I've got a ticket open with Microsoft support but so far nothing. IMAP works fine, just SMTP that doesn't accept the password. I've tried 5 different accounts, we are using a mix of E1 licenses and I'm wondering if there is any new security applied by Microsoft that we are not aware and is blocking access. I'm not using MFA on the account, so I cannot create an app password for that purpose.

    Someone help us please!

    Was this answer helpful?

    3 people found this answer helpful.
    0 comments No comments