|
@@ -3,7 +3,7 @@ set -euo pipefail
|
|
|
|
|
|
CROPSWAPDEBUG=cropswap-debug@shandan.one
|
|
|
SENDMAIL=/usr/sbin/sendmail
|
|
|
-
|
|
|
+: ${TEST:=0}
|
|
|
if (( TEST != 0)); then
|
|
|
cat -
|
|
|
cat <<-EOF >&2
|
|
@@ -11,7 +11,9 @@ if (( TEST != 0)); then
|
|
|
$(env)
|
|
|
EOF
|
|
|
else
|
|
|
- cat /proc/self/fd/5 - 5< <(cat -) <<-EOF | "$SENDMAIL" -F "${FROM:-}" -f "${MAILGROUP:-}" "${CROPSWAPDEBUG}"
|
|
|
+ makemime -j /proc/self/fd/{4,5} 4< <(cat -) 5<<-EOF | "$SENDMAIL" -F "${FROM:-}" -f "${MAILGROUP:-}" "${CROPSWAPDEBUG}"
|
|
|
+ Content-Type: text/plain; charset="utf-8"
|
|
|
+ Content-Disposition: attachment
|
|
|
|
|
|
ERROR ${1:-unknown}
|
|
|
$(env)
|