I recently took time to set up my UPS notifications to myself through email. I couldn't stop just there and now my UPS, my system, my renders etc, they all send me notifications to my email. This is really neat thing to have.
It can be done in just one command line but I use this simple extended (more human readable) script:
$EmailTo = "email@example.com"
$EmailFrom = "firstname.lastname@example.org"
$Subject = "topic"
$Body = "Hi"
$SMTPServer = "mail.example.com"
$SMTPMessage = New-Object System.Net.Mail.MailMessage($EmailFrom,$EmailTo,$Subject,$Body)
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 25)
$SMTPClient.EnableSsl = $false $SMTPClient.Credentials = New-Object System.Net.NetworkCredential("email@example.com", "smtp password"); $SMTPClient.Send($SMTPMessage)
You save it as a simple text file, change the extension to .ps1 and use the command like
to send the message to yourself. You can make plenty of them and add to windows Task Scheduler for each system event you want to be aware of.
If you interested I can make more extended tutorial for setting up your hMail server and configuring your domain’s DNS for it. Or you just DuckDuckGo for it, there’s already plenty of info online.