Sendmail as mail command
This commit is contained in:
parent
3ad3acad46
commit
31da9c897c
2 changed files with 14 additions and 11 deletions
|
|
@ -176,6 +176,7 @@ EMAIL_SUBJECT=
|
||||||
MAIL="mailx"
|
MAIL="mailx"
|
||||||
#MAIL="mail"
|
#MAIL="mail"
|
||||||
#MAIL="ssmtp"
|
#MAIL="ssmtp"
|
||||||
|
#MAIL="sendmail"
|
||||||
|
|
||||||
# TROUBLESHOOTING: If you are having any problems running this script it is
|
# TROUBLESHOOTING: If you are having any problems running this script it is
|
||||||
# helpful to see the command output that is being generated to determine if the
|
# helpful to see the command output that is being generated to determine if the
|
||||||
|
|
|
||||||
|
|
@ -270,6 +270,8 @@ email_logfile()
|
||||||
else
|
else
|
||||||
cat ${LOGFILE} | ${MAILCMD} -s """${EMAIL_SUBJECT}""" $EMAIL_FROM ${EMAIL_TO} -- -f ${EMAIL_FROM}
|
cat ${LOGFILE} | ${MAILCMD} -s """${EMAIL_SUBJECT}""" $EMAIL_FROM ${EMAIL_TO} -- -f ${EMAIL_FROM}
|
||||||
fi
|
fi
|
||||||
|
elif [[ "$MAIL" ~= "sendmail" ]]; then
|
||||||
|
(echo """Subject: ${EMAIL_SUBJECT}""" ; cat ${LOGFILE}) | ${MAILCMD} -f ${EMAIL_FROM} ${EMAIL_TO}
|
||||||
elif [ "$MAIL" = "nail" ]; then
|
elif [ "$MAIL" = "nail" ]; then
|
||||||
cat ${LOGFILE} | ${MAILCMD} -s """${EMAIL_SUBJECT}""" $EMAIL_FROM ${EMAIL_TO}
|
cat ${LOGFILE} | ${MAILCMD} -s """${EMAIL_SUBJECT}""" $EMAIL_FROM ${EMAIL_TO}
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue