SMTP sending email unsuccessful

SimSouls Group Notifications 20 Reputation points

I have exchange online account

there I have one email user and in that I have enabled SMTP AUTH,

so from my nodejs app

 domain: '',
        port: '25',
        fromEmail: 'email',
        password: 'pass'

I am receiving following error

Invalid login: 535 5.7.3 Authentication unsuccessful.

and when I checked signin logs

I am getting this error: Access has been blocked by security defaults

I tried everything but seems like nothing is working.

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,374 questions
Microsoft Exchange
Microsoft Exchange
Microsoft messaging and collaboration software.
455 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dillon Silzer 56,206 Reputation points


    SMTP has since been depreciated by default (security defaults). You will need to utilize OAuth 2.0 as seen in the article cited below.

    We've already started making this change. We now create new Microsoft 365 tenants with Basic authentication in Exchange Online turned off, because Security defaults is enabled for them.

    Cited from

    Authenticate an IMAP, POP or SMTP connection using OAuth

    If this is helpful please accept answer.

    0 comments No comments

0 additional answers

Sort by: Most helpful