Error While Configuring E-Mail Alerts Using Exchange Online Account

How to fix error "Sending the test mail failed! Original message: 5.7.57 Client not authenticated to send mail. (#2600)"?

Issue Description: When trying to enable e-mail alerts using Exchange Online account, the following error is received:

"Sending the test mail failed! Original message: 5.7.57 Client not authenticated to send mail. (#2600)"

Resolution:

First check if the issue persists when trying to send an e-mail from PowerShell, from the affected machine. Use the following script:

$cred = Get-Credential -UserName "example@domain.com" -Message "Enter password:"
$EmailFrom = "example@domain.com"
$EmailTo = "example@domain.com" #this must be a valid email address
$Subject = "test subject"
$Body = "Test message body"
$SMTPServer = "smtp.office365.com" #this is important; make sure it's correct
$smtpPort = 587
# try the following command with and without UseSsl;
Send-MailMessage -SmtpServer $SMTPServer -Port $smtpPort -From $EmailFrom -To $EmailTo -Subject $Subject -Body $Body -Credential $cred -UseSsl

If the script fails too, ensure that SMTP is enabled in Exchange Online.

To check this, an Exchange Online admin must Connect to Exchange Online in PowerShell and run the following cmdlet:

  • Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled

If the result is "True", it means that the Client SMTP Authentication is disabled.

The authentication can be enabled by running the following cmdlet:

  • Set-TransportConfig -SmtpClientAuthenticationDisabled $false

Note: This will enable the SMTP Authentication for all mailboxes.

To control this individually, use the below cmdlet to check the status per mailbox:

  • Get-CASMailbox -Identity example@domain.com | fl SmtpClientAuthenticationDisabled

The value $null indicates the setting for the mailbox is controlled by the global setting on the organization. If it is $true (disabled), set it as $false (enabled) to enable the SMTP authentication only for this mailbox. The mailbox setting takes precedence over the organization setting, therefore it overrides the organization setting.


To set it, run the following cmdlet:

  • Set-CASMailbox -Identity example@domain.com -SmtpClientAuthenticationDisabled $false

Reference: Enable or Disable Authenticatd Client SMTP Submission ( SMTP AUTH) In Exchange Online