n8n Outlook SMTP Connection Failing with Authentication Error

I’m having trouble getting my Outlook email to work with n8n automation platform. Every time I try to send emails through the SMTP node, it keeps giving me authentication errors.

Here’s my current setup:

  • Email: using my main Outlook email address
  • Authentication: generated app password (not my regular password)
  • Server: smtp.office365.com
  • Port: 587
  • Security: STARTTLS enabled, SSL disabled
  • Account settings: enabled IMAP/POP access and two-factor authentication

The error I keep getting says something like “Authentication unsuccessful, basic authentication is disabled” with error code 535 5.7.139.

I’ve tried switching between different SMTP servers like smtp-mail.outlook.com but nothing seems to work. Is there some other setting in my Microsoft account that I’m missing? Maybe something in the security settings that blocks n8n from connecting?

Any help would be great because I really need to get automated emails working for my workflow.

Microsoft killed basic auth for most tenants by now, so that’s why your app password isn’t working. Hit this same wall about six months ago when our automation just died overnight. Easiest fix? Switch to Gmail or SendGrid for automated emails instead of wrestling with Microsoft’s OAuth2 mess. If you’re stuck with Outlook, you’ll need Azure app registration and admin access to your tenant. Worth checking if your org has shared mailboxes though - those sometimes still work with basic auth depending on the setup. Honestly, switching providers saved me hours of config headaches for simple automation stuff.

ya, looks like ms is crackin down on basic auth. switching to oauth2 should def help! make sure ur admin checks the settings in the exchange center. gl!

Had this exact problem a few months ago with my company’s automation. Microsoft killed basic auth for Exchange Online in late 2022. Your app password won’t work no matter what SMTP settings you try. You’ve got to set up Azure App Registration with OAuth2 instead. Hit the Azure portal, register a new app, add Mail.Send API permissions, and grab your client credentials. Then switch your n8n SMTP node from username/password to OAuth2 with those credentials. You could temporarily flip basic auth back on through Exchange Admin Center under Authentication Policies if you’re an admin, but Microsoft hates this for security reasons. OAuth2’s more hassle upfront but way more solid long-term.