The simplest solution depends on which method you prefer to send emails.
If you have, for example, sendmail already installed - in this case you can call it with parameters to send mail with the notification log. It depends on your system settings.
source
share