Merge pull request #47 from jverdeyen/feature/sendmail
added sendmail as mail command
This commit is contained in:
commit
82ff39370c
2 changed files with 14 additions and 11 deletions
|
|
@ -176,6 +176,7 @@ EMAIL_SUBJECT=
|
|||
MAIL="mailx"
|
||||
#MAIL="mail"
|
||||
#MAIL="ssmtp"
|
||||
#MAIL="sendmail"
|
||||
|
||||
# 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
|
||||
|
|
|
|||
|
|
@ -270,6 +270,8 @@ email_logfile()
|
|||
else
|
||||
cat ${LOGFILE} | ${MAILCMD} -s """${EMAIL_SUBJECT}""" $EMAIL_FROM ${EMAIL_TO} -- -f ${EMAIL_FROM}
|
||||
fi
|
||||
elif [[ "$MAIL" ~= "sendmail" ]]; then
|
||||
(echo """Subject: ${EMAIL_SUBJECT}""" ; cat ${LOGFILE}) | ${MAILCMD} -f ${EMAIL_FROM} ${EMAIL_TO}
|
||||
elif [ "$MAIL" = "nail" ]; then
|
||||
cat ${LOGFILE} | ${MAILCMD} -s """${EMAIL_SUBJECT}""" $EMAIL_FROM ${EMAIL_TO}
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue