I have a powershell script configured to send emails via SMTP that fires every time a task is complete. The emails are hosted locally on the server using Exchange 2013. If I specify the recipient be to be internal (on the same @domainname.com) the email is sent successfully without any problem.
However if I try and send to an external domain (@differentdomainname.com) we get the following error:
Exception calling "Send" with "1" argument(s): "Mailbox unavailable. The server response was: 5.7.1 Unable to relay" At C:\EmailBackupResults.ps1:26 char:1 + $SmtpClient.Send($Msg)
This seems to be a setting within Exchange 2013 somewhere (I suspect a receive connector?) but I do not know what I would change to get this working. I do have full access to settings. Am I missing something or am I completely in the wrong area?