Steven Reid
asked on
Issues sending emails from script
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.
any ideas?
Password_Change_Notification.txt
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.
any ideas?
Password_Change_Notification.txt
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here's the PowerShell script for your testing in case you need it:
Send-MailMessage -From "Sender@PowerShell.domain.com" -To "yourself@domain.com" -Subject "Testing email relay" -Body "Anonymous Email Relay" -SmtpServer "SMTP.domain.com" -DeliveryNotificationOption OnFailure -Verbose
ASKER
When i ran it under the same account, it was all good.
Thanks