Skip to content

Commit

Permalink
prevent _MAIL_BIN modification
Browse files Browse the repository at this point in the history
  • Loading branch information
honzahommer committed May 13, 2019
1 parent e3052c8 commit 30f2c2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions notify/mail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ mail_send() {

_mail_cmnd() {
if [ -n "$MAIL_BIN" ]; then
_MAIL_BIN=$(basename "$MAIL_BIN")
_MAIL_BIN="$MAIL_BIN"
elif _exists "sendmail"; then
_MAIL_BIN="sendmail"
elif _exists "ssmtp"; then
Expand All @@ -86,7 +86,7 @@ _mail_cmnd() {
return 1
fi

case "$_MAIL_BIN" in
case $(basename "$_MAIL_BIN") in
sendmail)
if [ -n "$MAIL_FROM" ]; then
echo "'$_MAIL_BIN' -f '$MAIL_FROM' '$MAIL_TO'"
Expand Down

0 comments on commit 30f2c2b

Please sign in to comment.