Azure Communication Services: 550 5.3.5 Email sender’s username is invalid
When mucking around with Azure’s Communication Services SMTP relay, I was encountering the error:
550 5.3.5 Email sender’s username is invalid
I mistakingly thought this was related to the SMTP AUTH component (as I was having issues with that) and was attempting all sorts of combinations of usernames as mentioned on the SMTP Authentication tutorial page to no avail.
Turns out it was because I was using no-reply@domain
rather than the default DoNotReply@domain
! It needed to be a valid MailFrom domain as listed under the Email Communication Services Domain | MailFrom addresses (this defaults to DoNotReply and you can’t change it unless you submit a support request apparently, presumably to help prevent abuse).
As soon as I changed to DoNotReply@domain
it authenticated and sent the test email perfectly fine.