diff --git a/mail.sh b/mail.sh index fae5ea1..b797447 100755 --- a/mail.sh +++ b/mail.sh @@ -1,4 +1,9 @@ #!/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"