Cannot send mails via MS365 with modern authentication #3997

Closed
opened 2026-02-05 08:02:00 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @Man-in-Black on GitHub (Aug 22, 2023).

Describe the Bug

I wanted to use the email notifications to send updated to my mail if there are some changes.
But I wasn't able to get it to work with our MS365 accounts, where Microsoft disabled basic authentication.

Steps to Reproduce

  1. set the smtp setting in the .env file with the MS365 account
  2. try to send a mail

Expected Behaviour

After I added the setting the mail should be delivered

Screenshots or Additional Context

error-notification:

Error sending a test email: Failed to authenticate on SMTP server with username "x@y.com" using the following authenticators: "LOGIN", "XOAUTH2". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. [FRxxx.DEUPxxx.PROD.OUTLOOK.COM 2023-08-22T11:44:59.154Z 08DBA260ED29A18C]".". Authenticator "XOAUTH2" returned "Expected response code "235" but got code "535", with message "535 5.7.3 Authentication unsuccessful [FRxxx.DEUPxxx.PROD.OUTLOOK.COM 2023-08-22T11:45:13.339Z 08DBA260ED29A18C]".".

Browser Details

No response

Exact BookStack Version

v23.06.2

PHP Version

No response

Hosting Environment

Ubuntu 22.04, installed using official installation script

Originally created by @Man-in-Black on GitHub (Aug 22, 2023). ### Describe the Bug I wanted to use the email notifications to send updated to my mail if there are some changes. But I wasn't able to get it to work with our MS365 accounts, where Microsoft disabled basic authentication. ### Steps to Reproduce 1. set the smtp setting in the .env file with the MS365 account 2. try to send a mail ### Expected Behaviour After I added the setting the mail should be delivered ### Screenshots or Additional Context error-notification: `Error sending a test email: Failed to authenticate on SMTP server with username "x@y.com" using the following authenticators: "LOGIN", "XOAUTH2". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. [FRxxx.DEUPxxx.PROD.OUTLOOK.COM 2023-08-22T11:44:59.154Z 08DBA260ED29A18C]".". Authenticator "XOAUTH2" returned "Expected response code "235" but got code "535", with message "535 5.7.3 Authentication unsuccessful [FRxxx.DEUPxxx.PROD.OUTLOOK.COM 2023-08-22T11:45:13.339Z 08DBA260ED29A18C]".".` ### Browser Details _No response_ ### Exact BookStack Version v23.06.2 ### PHP Version _No response_ ### Hosting Environment Ubuntu 22.04, installed using official installation script
OVERLORD added the 🔨 Feature Request🏭 Back-End labels 2026-02-05 08:02:00 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3997