Trying to send mail on port 587: Client not authenticated to send mail
Wondering if I can get some help. I have a mailbox o365 (email address removed for privacy reasons) that I need to send emails using 587 but getting:
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, the user credentials were incorrect
Things I’ve done so far:
* I’ve set “SmtpClientAuthenticationDisabled” to False
* I have tried both “smtp.office365.com” and “mydomain.mail.protection.outlook.com”
* When testing the connection “Test-NetConnection” it connects ok with both 25 and 587
I found this post
https://learn.microsoft.com/en-us/answers/questions/512954/535-5-7-139-authentication-unsuccessful
Link to the comment
When creating a new mailbox on o365 it was able to send ok on 587/25. The original application mailbox is an onprem user that was moved to o365 if that makes any difference while the new mailbox is o365 only.
I also tried setting up a new “Authentication” policy:
New-AuthenticationPolicy -Name “Allow Basic Auth SMTP” -AllowBasicAuthSmtp:$true
Then adding applications@mydomain to that policy but its still the same.
I looked into smtp2go a while back for another account but management being management it never materialized. This was got dropped on my lap like a hot potato and I’m embarrassed to say that I’m actually struggling to figure out where I’m going wrong.
Wondering if I can get some help. I have a mailbox o365 (email address removed for privacy reasons) that I need to send emails using 587 but getting: 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, the user credentials were incorrect Things I’ve done so far:* I’ve set “SmtpClientAuthenticationDisabled” to False* I have tried both “smtp.office365.com” and “mydomain.mail.protection.outlook.com”* When testing the connection “Test-NetConnection” it connects ok with both 25 and 587I found this posthttps://learn.microsoft.com/en-us/answers/questions/512954/535-5-7-139-authentication-unsuccessful Link to the commenthttps://imgur.com/a/sQbgWxx When creating a new mailbox on o365 it was able to send ok on 587/25. The original application mailbox is an onprem user that was moved to o365 if that makes any difference while the new mailbox is o365 only.I also tried setting up a new “Authentication” policy: New-AuthenticationPolicy -Name “Allow Basic Auth SMTP” -AllowBasicAuthSmtp:$true Then adding applications@mydomain to that policy but its still the same. I looked into smtp2go a while back for another account but management being management it never materialized. This was got dropped on my lap like a hot potato and I’m embarrassed to say that I’m actually struggling to figure out where I’m going wrong. Read More