The email is pretty basic. It displays in basic text format. I'd like the results of this backup to display in HTML with a header saying something like "Helpdesk backup results for $date" and then the results below that.
Dan,
When I used your code this is what was in the body of the message:
<html><head></head><body><h1>Helpdesk backup results for 2015-09-29</h1><pre> upload: .\Backup.bat to s3://mybucket/daily/batch/Backup.bat Completed 1 of 2 part(s) with 1 file(s) remaining upload: .\Email.ps1 to s3://mybucket/daily/batch/Email.ps1 </pre></body></html>
One more formatting question. How can I change the font for the header and put background color behind the header and log entries? (maybe alternating colors between each log entry line to make it easier to read?)
You'll need to define a table and use css for that.
I don't know if the limited HTML interpreter used in email messages supports the :nth-child pseudoclass for alternating colors.
You're better off asking this as a new question with a css tag and provide the expected output from your log.
Open in new window
HTH,Dan