#!/bin/bash MAILTO="root" MAILFROM="root@internal.heavensinferno.net" UNIT=$1 EXTRA="" for e in "${@:2}"; do EXTRA+="$e"$'\n' done UNITSTATUS=$(systemctl status $UNIT) sendmail $MAILTO <