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