1

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?

W0lf7
  • 141
  • 3
  • You likely need to setup the email to send externally to send as an email address that authenticates with Exchange with its credentials against Exchange be able to send externally, or else you'd have to allow the IP address of the server it's being generated from to be able to relay which I personally wouldn't do for external email in my environment but if you are able to then see: http://www.petenetlive.com/KB/Article/0000891 for further detail... One of those two solutions should solve your problem - let me know how it goes and if you want me to add an answer for you to accept if so. – Vomit IT - Chunky Mess Style Aug 18 '16 at 01:02

0 Answers0