Errors

5.7.57: client was not authenticated to send mail (Office 365 SMTP)

Short answer

5.7.57 is Microsoft 365's error for an app, printer or script that connected to smtp.office365.com and tried to send without authenticating. Microsoft's text is "Client was not authenticated to send anonymous mail during MAIL FROM". Fix it by using the right mailbox credentials, connecting on port 587 with STARTTLS so authentication can happen, and making sure SMTP AUTH is enabled for that mailbox and not blocked by security defaults.

Last checked 16 November 2026

5.7.57 means an application or device connected to Microsoft 365’s smtp.office365.com endpoint and tried to send without logging in first. Microsoft treated it as anonymous mail and refused. The problem is in the sending app’s settings, not in the message or the recipient.

The error message

Microsoft’s NDR reference lists it as:

5.7.57 Client was not authenticated to send anonymous mail during MAIL FROM

Microsoft’s fix page calls it 550 5.7.57. The three-digit reply code and wording in your app’s log can differ, so go by the 5.7.57.

What it means

When you submit mail through smtp.office365.com, Microsoft requires you to authenticate as a user who has an Exchange Online mailbox. The 5.7.57 fix page says the bounce points to a problem in the configuration of the connecting application or device. The code 5.7.57 is Microsoft’s own. It is not in the IANA registry of enhanced status codes, so the meaning is whatever Microsoft says it is.

Why it happens

  • No credentials configured, or the “SMTP server requires authentication” box is unticked.
  • Wrong username or password, or the password changed and the device still has the old one.
  • TLS was not negotiated. Microsoft requires TLS in order to authenticate. Old printers and scanners that only speak older TLS versions, or apps set to “no encryption”, never reach the login step.
  • SMTP AUTH is disabled for the mailbox or the whole organization. If security defaults are on in Microsoft Entra ID, SMTP AUTH is already off.
  • Basic authentication is blocked by an authentication policy, so a username and password login is refused even with SMTP AUTH enabled.
  • The From address is a different mailbox that the login is not allowed to send as.

How to fix it

  1. Use these settings: server smtp.office365.com, port 587, encryption STARTTLS (sometimes called TLS), authentication on, username = the full mailbox address.
  2. Re-enter the password for that mailbox. If the account uses multifactor sign-in, a plain password may not work for SMTP.
  3. Enable SMTP AUTH for the mailbox. In the Microsoft 365 admin center, open the user, Mail, Manage email apps, and tick Authenticated SMTP. Or in Exchange Online PowerShell:
    Set-CASMailbox -Identity app@yourdomain.com -SmtpClientAuthenticationDisabled $false
  4. Check security defaults and authentication policies. Microsoft’s SMTP AUTH article explains that security defaults disable SMTP AUTH and that a policy blocking basic authentication overrides the mailbox setting.
  5. Update old devices whose firmware cannot do modern TLS, or point them at a relay that accepts them.
  6. Send as the mailbox you log in with, or grant Send As permission for the address in From.

Full settings for apps are in our Outlook and Office 365 SMTP guide. For printers and scanners, see scan to email SMTP setup.

Which server sent it

Provider What you see
Microsoft 365 / Exchange Online 5.7.57 with the text above. This code is specific to Microsoft.
Gmail Gmail uses 530 5.7.0 Authentication required and 530 5.7.0 Must issue a STARTTLS command first for the same kind of problem.
Yahoo Not applicable: this is a submission error, not a delivery error.
Generic servers Most return 530 5.7.0 Authentication required or 550 5.7.1 with relay denied text.

Is it temporary?

No. Retrying with the same settings fails the same way every time. Change the configuration first. Once the app authenticates successfully, the same messages go through.

How Mailcandor handles it

If an app or device keeps fighting Office 365 SMTP, you can point it at Mailcandor’s SMTP relay instead: smtp.mailcandor.com, port 587 with STARTTLS or 465 with TLS, username mailcandor and an API key as the password. Delivery problems after that are explained in plain English by the deliverability coach, and hard bounces are suppressed automatically. Look up other codes with the free bounce code lookup, or see all error codes. More free checks are on the tools page. To make sure your own domain is authenticated, follow the SPF, DKIM and DMARC setup guide.

Questions

What does 5.7.57 client not authenticated mean?

The device or app sent MAIL FROM before logging in, so Microsoft 365 treated it as an anonymous sender and refused. Either no credentials were sent, they were wrong, or authentication could not start.

Why does TLS matter for 5.7.57?

Microsoft requires TLS before authentication on smtp.office365.com. If the client cannot negotiate TLS, it never gets to log in, and the next command fails with 5.7.57.

SMTP AUTH is enabled but I still get 5.7.57. Why?

Security defaults in Microsoft Entra ID turn SMTP AUTH off, and an authentication policy that blocks basic authentication for SMTP overrides the mailbox setting. Check both.

Can I send through Office 365 without a login?

Not on smtp.office365.com. Microsoft offers direct send and connector-based relay for devices that cannot log in, which have their own limits. Many teams use a separate SMTP relay or email API for app mail.

Related

Send with someone on your side.

Unlimited domains on every plan, a person before any block, and 3,000 emails a month free. Tell us what you send and we set you up within one business day.