Fix Office 365 SMTP Error 5.7.57 When Sending Email
Question details
An application needs to send email reliably through Office 365 SMTP client submission.

- Product
- Microsoft 365 Exchange Online SMTP
- Device & OS
- not provided
- Scenario
- A C# application sends email through smtp.office365.com on port 587 using authenticated credentials.
- Observed behavior
- Most messages send successfully, but some attempts return SMTP error 5.7.57 during MAIL FROM, and retries do not always succeed.
Identify the sending mailbox, the From address, and the authentication method used by the application. Make sure you have access to the Microsoft 365 and Exchange admin centers or can ask an administrator to perform the checks.
Verify SMTP AUTH and the application's authentication settings
Use this check to confirm that the mailbox can authenticate and that the application negotiates TLS before sending.
In the Microsoft 365 admin center, open Users > Active users, select the sending user, and choose Mail > Manage email apps. Check that Authenticated SMTP is enabled.
In Exchange Online PowerShell, run Get-TransportConfig and check SmtpClientAuthenticationDisabled. Also run Get-CASMailbox for the sending mailbox to inspect its SmtpClientAuthenticationDisabled setting; a mailbox setting can override the organization setting.
In the application configuration, use smtp.office365.com on port 587 and negotiate STARTTLS before authentication. For C# SmtpClient, set EnableSsl to true and UseDefaultCredentials to false, then supply the intended credentials.
Check the application's SMTP authentication method and your organization's authentication policies. If password-based authentication is blocked or unavailable, configure a supported OAuth authentication flow and use an SMTP library that supports it.

Check the sender address and mailbox permissions
Use this solution when the authenticated account and the From address are different.
Investigate intermittent SMTP authentication failures
Use service health, application logs, and message traces to narrow down failures that occur only occasionally.
Edit Office documents with WPS Office
WPS Office is a free, lightweight alternative for working with Office documents in a familiar interface. Its Microsoft Office format support helps you move existing files over, although it does not fix Exchange Online SMTP authentication errors.

Frequently Asked Questions
Why does SMTP fail when Outlook can send email?
Outlook and SMTP client submission can use different authentication methods and policies. Check Authenticated SMTP under the user's Mail > Manage email apps settings and review the application's authentication method.
Should I use SSL or STARTTLS on port 587?
Use STARTTLS with smtp.office365.com on port 587. In C# SmtpClient, EnableSsl set to true enables the STARTTLS upgrade; it does not mean connecting with implicit TLS on a different port.
Can the From address differ from the authenticated mailbox?
It can, but the authenticated account needs the appropriate permission to send as the other mailbox. Check mailbox delegation in the Exchange admin center and test with the authenticated mailbox as the From address.
Why is there no message trace for a failed SMTP attempt?
A message rejected during the SMTP conversation before submission may not appear in message trace. Check the application's SMTP response and connection logs alongside Exchange Online service health.
What if username and password authentication is blocked?
Review your organization's authentication policies and current Microsoft support for the method. If password-based SMTP authentication is unavailable, configure OAuth and use an SMTP library that supports it.




