MRP Log - Stop Appending & Clean Up Files

After running for the first time on real data last night, I modified the send email section to correct the syntax of multiple email recipients, and to prevent the email from being sent if there was no errors found. So here is what that section should look like:

if ($EmailBody.Length -ge 170) 
{
Send-MailMessage -From MRP@ppsystems.com -Subject "MRP Log Results" -To "xxx@ppsystems.com", "xxx@ppsystems.com" -Body $EmailBody -SmtpServer 10.0.0.5
}
3 Likes