In this recipe, you'll find out how to use the Send-MailMessage cmdlet to send an email to an intended recipient from within PowerShell.
Sending email messages
Getting ready
This script is going to be an enhancement of the previous recipe.
How to do it...
Here's the script that will send the email message:
- Save the following content in the PSHTMLReport.ps1 file:
# inputfile - filelocation of the CSV file
$inputfile='/tmp/input.CSV'
# Output file
$outfile='/tmp/out.html'
#Email variable declaration
$from = 'donotreply@packtpublinux.com...