Troubleshooting Outlook SMTP Authentication in n8n

I’m having trouble setting up my Outlook SMTP in n8n. I’ve done everything I can think of:

  • Turned on IMAP and POP in Outlook
  • Set up two-step verification and got an App Password
  • Put in my SMTP info in n8n:

But I keep getting this error:

Couldn't connect with these settings Invalid login: 535 5.7.139 Authentication unsuccessful, basic authentication is disabled.

What am I missing? Do I need to change something else in my Outlook account to make this work?

Any help would be great. Thanks!

I encountered a similar issue when setting up Outlook SMTP in n8n. The error you’re seeing suggests that basic authentication is disabled, which is a security measure Microsoft has implemented.

Instead of using an App Password, I switched to using OAuth2 authentication. In n8n, look for the ‘Authentication’ dropdown in the SMTP node settings and select ‘OAuth2’. You’ll need to set up an Azure AD application and obtain the necessary credentials (Client ID, Client Secret, etc.).

Also, make sure you’re using the correct host for modern authentication: outlook.office365.com

It’s a bit more complex to set up initially, but it’s more secure and reliable in the long run. If you’re stuck on any part of the OAuth2 setup, Microsoft’s documentation on the subject is quite helpful.

Hope this helps you resolve the issue!

Hey mate, had same prob. Microsoft’s bein a pain blockin basic auth. Try usin their Graph API instead - it’s way better. Gotta set up an app in Azure AD, but then u can use the Microsoft Outlook node in n8n. Bit of a hassle to setup but works like a charm after. lemme know if u need help!

Have you considered using Microsoft Graph API instead of SMTP? I recently switched to this method for integrating Outlook with n8n, and it’s been much more reliable.

To set it up, you’ll need to register an application in Azure AD and grant it the necessary permissions. Then, in n8n, use the Microsoft Outlook node instead of the SMTP node. It uses modern authentication by default, so you won’t run into the basic auth issues.

The setup process is a bit involved, but once it’s done, it’s smooth sailing. Plus, you get access to more Outlook features beyond just sending emails. If you decide to go this route and need guidance, Microsoft’s Graph API documentation is quite comprehensive.