server-scripts/mail.sh

10 lines
184 B
Bash
Executable File

#!/bin/bash
MAILTO=$(cat "$HOME/.admin_mail")
if [ -f "$HOME/.host_mail" ]; then
MAILFROM=$(cat "$HOME/.host_mail")
fi
SUBJECT=$1
cat | mailx -s "$SUBJECT" -r "$MAILFROM" "$MAILTO"