After move one domain to office 365 we try to send emails through smtp but not working,

we disable multifactor authentication for the user and domain:

the problem can be identified and demostrated with powershell:

  1. $credential = Get-Credential  ( enter user id and passwod of one account with outlook license)
  2. Send-MailMessage -From user1@clientdomain.com -To user2@clientdomain.com -Subject “test” -SmtpServer smtp.office365.com -Credential $credential -UseSsl -Port 587
  3. this error appear :  5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM [MR2P264CA0054.FRAP264.PROD.OUTLOOK.COM]

to solve it go to powershell session and chech this:

  • Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled
  • if was true, change it to false : Set-TransportConfig -SmtpClientAuthenticationDisabled $false
Facebooktwitterredditpinterestlinkedinmail