Table of Contents
5.7.57 Client not authenticated to send mail
In some cases, you are getting the below error while sending email from your apps, PowerShell, printers…The issue comes because Office 365 mailboxes have SMTP client authentication disabled by default. So, make sure to enable SMTP authentication for your mailbox.
Send-MailMessage : The SMTP server requires a secure connection or the client was not authenticated. The server
response was: 5.7.57 Client not authenticated to send mail. Error: 535 5.7.139 Authentication unsuccessful,
SmtpClientAuthentication is disabled for the Tenant. Visit https://aka.ms/smtp_auth_disabled for more information.
[SI2PR06CA0014.apcprd06.prod.outlook.com]
At line:1 char:1
+ Send-MailMessage `
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.Mail.SmtpClient:SmtpClient) [Send-MailMessage], SmtpExcept
ion
+ FullyQualifiedErrorId : SmtpException,Microsoft.PowerShell.Commands.SendMailMessage
Before you begin
If your tenant was created on or after October 22, 2019, security defaults may be enabled in your tenant. To protect all of our users, Security Defaults are being rolled out to all new tenants at creation.
Enable SMTP Authentication on Microsoft 365
There’re two ways to enable or disable SMTP Authentication:
- Through Micrsoft 365 admin center.
- Through Exchange Online PowerShell.
Enable SMTP Authentication on Microsoft 365 admin center
1. Login into Microsoft 365 admin center using a global admin account.
2. Navigate to User | Active users on the left pane. Then select the account you want to enable SMTP authentication from the list of users.
3. In the flyed-out menu, click on the Mail tab then select the link Manager email apps.
4. Select the checkbox Authenticated SMTP to enable SMTP Authentication for this mailbox account.
5. Wait a few minutes to take the change goes into effect then try to send an email from your apps or printers to verify it works.
As you can see, the error was gone, and your message was sent using a SMTP client.
Enable SMTP Authentication using PowerShell
The second way, you can use Exchange Online PowerShell to enable or disable SMTP Authentication for mailboxes in your Microsoft 365 tenant.
1. Connect to Exchange Online using PowerShell using the following command:
Connect-ExchangeOnline
2. Run the following command to check SMTP Authentication status:
Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled
SmtpClientAuthenticationDisabled property is True means the SMTP AUTH is already disabled on your tenant.
3. Microsoft highly recommend that you disable SMTP Authentication in your Exchange Online organization, and enable it only for the accounts that still require it.
Run the below command to enable SMTP Authentication for a single mailbox (Chris’s account).
Set-CASMailbox -Identity [email protected] -SmtpClientAuthenticationDisabled $false
4. Then execute the following command to get the SMTP Authentication status for the email account.
Get-CASMailbox -Identity [email protected] | FL SmtpClientAuthenticationDisabled