Send-MailMessage without authentication

I'm running scripts under domain accounts which are sending various mails using the Send-MailMessage cmdlet with various sender addresses.

Unfortunately Send-MailMessage always authenticates with that account to the mail relay (an exchange server) but then gets told it isn't allowed to send mail:

Send-MailMessage : Mailbox unavailable. The server response was: 5.7.1 Client does not have permissions to send as this sender


I know this could be enabled on the exchange side, but it's really dumb because anonymously sending mail internally with any sender is allowed on these relays.

I also know it's easy to build my own Sendmail function and I do have one at my disposal, but is it possible to just disable authentication for Send-MailMessage? I haven't found any switch to do just that.

Parents Reply Children
No Data