Use mutt if available, else fallback to mail or sendmail.
intrigeri
12 years ago
80 | 80 | |
81 | 81 | _mail() { |
82 | 82 | local subject="$1" |
83 | if which mail > /dev/null ; then | |
83 | if which mutt > /dev/null ; then | |
84 | LC_ALL="$LOCALE" mutt -s "$subject" "$EMAIL_ADDRESS" | |
85 | elif which mail > /dev/null ; then | |
84 | 86 | LC_ALL="$LOCALE" mail -s "$subject" "$EMAIL_ADDRESS" |
85 | 87 | elif [ -x /usr/sbin/sendmail ]; then |
86 | 88 | LC_ALL="$LOCALE" add_header "$subject"|/usr/sbin/sendmail "$EMAIL_ADDRESS" |
87 | elif which mutt > /dev/null ; then | |
88 | LC_ALL="$LOCALE" mutt -s "$subject" "$EMAIL_ADDRESS" | |
89 | 89 | fi |
90 | 90 | } |
91 | 91 |