Outlook 365 Email Settings
NodeBB version
4.5.1
NodeBB git hash
No response
NodeJS version
v22.19.0
Installed NodeBB plugins
All the default plugins
Database type
PostgreSQL
Database version
v17.6
Exact steps to cause this issue
- Go to /admin/settings/email
- Choose Outlook 365
- Enter username and password of account
- Receive error when attempting to send a validation or test email because the Outlook tenancy requires 2FA on our Microsoft accounts
Error: 2025-09-04T07:33:15.838Z [4567/56] - error: [user.create] Validation email failed to send [emailer.send] Error: Invalid login: 535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. [JNXP275CA0046.ZAFP275.PROD.OUTLOOK.COM 2025-09-04T07:33:17.573Z 08DDEB18D36B9651] at SMTPConnection._formatError (/usr/src/app/node_modules/nodemailer/lib/smtp-connection/index.js:809:19) at SMTPConnection._actionAUTHComplete (/usr/src/app/node_modules/nodemailer/lib/smtp-connection/index.js:1588:34) at SMTPConnection. (/usr/src/app/node_modules/nodemailer/lib/smtp-connection/index.js:1542:18) at SMTPConnection._processResponse (/usr/src/app/node_modules/nodemailer/lib/smtp-connection/index.js:993:20) at SMTPConnection._onData (/usr/src/app/node_modules/nodemailer/lib/smtp-connection/index.js:774:14) at SMTPConnection._onSocketData (/usr/src/app/node_modules/nodemailer/lib/smtp-connection/index.js:195:44) at TLSSocket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5)
What you expected
- Go to /admin/settings/email
- Choose Outlook 365
- Enter username and password of account
- Authenticate with 2FA successfully to link account
- Send successful mails.
What happened instead
Unable to send emails at all from an Outlook account with 2FA linked to it.
Anything else?
Most companies are now opting for 2FA on their Microsoft / Outlook accounts, it would help a lot of this is available out the box somehow.
Source: NodeBB/NodeBB