Many of your scripts require to send mail. There are several ways to send mail, but I am introducing you with SMTP mail sending script here. The code will accept below values which either you can hard-code inside the script or you can make a config file or ini file to get the settings. Below is simple piece of code for the same:
How to send mail to multiple recipients?
This can be done by modifying NOTIFY_ID variable with below -
$NOTIFY_ID=som@foo.com,john@foo.com
Make sure you are using a comma(,) to separate two Mail-Ids.
How to Send HTML Formatted mail using Powershell ?
This is another good option which can be done easily with Powershell. You need to just add one more line inside the code:
Easy and Simple. Enjoy Scripting!!
How to send mail to multiple recipients?
This can be done by modifying NOTIFY_ID variable with below -
$NOTIFY_ID=som@foo.com,john@foo.com
Make sure you are using a comma(,) to separate two Mail-Ids.
How to Send HTML Formatted mail using Powershell ?
This is another good option which can be done easily with Powershell. You need to just add one more line inside the code:
Easy and Simple. Enjoy Scripting!!