Use sendmail since mail/s-nail gets the mimetype of the email body wrong
This commit is contained in:
parent
d3e6d66a3f
commit
c22b59dc85
@ -132,7 +132,7 @@ send () {
|
|||||||
local psi="$(print_psi $(tr '[[:upper:]]' '[[:lower:]]' <<< ${psi_type}))"
|
local psi="$(print_psi $(tr '[[:upper:]]' '[[:lower:]]' <<< ${psi_type}))"
|
||||||
|
|
||||||
|
|
||||||
local email=$(mktemp /tmp/psi.eml.XXXX)
|
local email=$(mktemp /tmp/psi.eml.XXXX.txt)
|
||||||
local subj
|
local subj
|
||||||
printf "Pressure Stall Information for ${host} triggered on ${psi_type} at $(date +'%FT%T %Z')\n\n" > ${email}
|
printf "Pressure Stall Information for ${host} triggered on ${psi_type} at $(date +'%FT%T %Z')\n\n" > ${email}
|
||||||
if [[ -n "${current_alarms}" ]]; then
|
if [[ -n "${current_alarms}" ]]; then
|
||||||
@ -154,10 +154,12 @@ send () {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# send the message
|
# send the message
|
||||||
/usr/bin/mail -m ${email} --resource-files=/ \
|
(
|
||||||
--subject="${subj}" \
|
printf "To: ${dst}\n"
|
||||||
--end-options \
|
printf "Subject: ${subj}\n"
|
||||||
${dst}
|
cat ${email}
|
||||||
|
) | sendmail -t
|
||||||
|
|
||||||
#set +x
|
#set +x
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user