Browse Source

Merge pull request #45 from YunoHost-Apps/donotusemail

Do not use /usr/bin/mail
pull/46/head
Maniack Crudelis 8 years ago
committed by GitHub
parent
commit
c7c2906b78
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      scripts/_common.sh

10
scripts/_common.sh

@ -210,6 +210,14 @@ Automatic diagnosis data from YunoHost
$(yunohost tools diagnosis | grep -B 100 "services:" | sed '/services:/d')" $(yunohost tools diagnosis | grep -B 100 "services:" | sed '/services:/d')"
# Define binary to use for mail command
if [ -e /usr/bin/bsd-mailx ]
then
local mail_bin=/usr/bin/bsd-mailx
else
local mail_bin=/usr/bin/mail.mailutils
fi
# Send the email to the recipients # Send the email to the recipients
echo "$mail_message" | mail -a "Content-Type: text/plain; charset=UTF-8" -s "$mail_subject" "$recipients"
echo "$mail_message" | $mail_bin -a "Content-Type: text/plain; charset=UTF-8" -s "$mail_subject" "$recipients"
} }
Loading…
Cancel
Save