I recently realized that the script I am using to send me emails from task scheduler can be misused like I could use the script to send an email from anyone on my Exchange to any other person.
A) How can I stop this....this is not a question about domain spoofing, this is about the script being able to use any account to send email without the password.
B)If I stop it...what changes will I need to make to my script so that I can keep receiving email about logs and other reports and stuff.
We are using Exchange 2016. The script I am using just uses $messageParameters having the mail Subject, Body, From, To & SMTP Server