Issue Detail:
Was using the following powershell command to send the email from the IIS/SMTP relay
Send-MailMessage -From "nawaz@domain.com" -to "khan@domain.com" -Cc "ali@domain.com" -Subject "SUBJECT TEST with no cred" -Body "BODY Test for the email" -SmtpServer SMTPSERVERNAME -Credential USER -usessl
but was unable to do so, getting the following error.
Error:
Send-MailMessage : Mailbox unavailable. The server response was: 5.7.1 Unable to relay for nawaz@domain.com
Solution:
Go to IIS and right click on your SMTP relay-->Properties-->Access tab-->Relay--->add the IP from where you are trying to send the emails