Sending an email using Powershell couldn't be easier. You just need to use the Send-MailMessage commandlet.
It is used as follows.
Send-MailMessage
-From "ReubenBartolo@test.com"
-To "ReubenBartolo@test.com"
-Subject "Hello"
-Body "World"
-SmtpServer "mail.test.com"
To add more than one recepient, just add as follows.
-To "Receiver1@test.com","Receiver2@test.com"
No comments:
Post a Comment