server-scripts/mail.sh

10 lines
184 B
Bash
Raw Normal View History

2020-02-02 06:47:47 +01:00
#!/bin/bash
MAILTO=$(cat "$HOME/.admin_mail")
2020-02-05 01:18:44 +01:00
if [ -f "$HOME/.host_mail" ]; then
MAILFROM=$(cat "$HOME/.host_mail")
fi
2020-02-02 06:47:47 +01:00
SUBJECT=$1
2020-02-02 06:49:12 +01:00
cat | mailx -s "$SUBJECT" -r "$MAILFROM" "$MAILTO"