I had this question after viewing Notify AD users by sending email to them before their password gets expired
I have used the script above to create a reminder email to send out to users.
the trouble is that i keep getting errors when sending the email, saying error message like below
Error Sending Email to xxxx using the email xxxxx Failed item is . The error message was Exception calling "Send" with "1" argument(s): "Failure sending mail."
I am trying to run the powershell script on the exchange server itself, so am not sure what the issue is.