Hi,

I have attached a more complete patch which fixes some more encoding
errors.

Cheers,
-- 
Guinness
From c26f38014c2ce51bd28648273b4d8c07d94dbd07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Oudin?= <remi.ou...@lip6.fr>
Date: Fri, 13 Aug 2021 14:16:58 +0200
Subject: [PATCH] Fix mail encoding errors

---
 bin/common | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/bin/common b/bin/common
index 7f3cc50..1da34e1 100644
--- a/bin/common
+++ b/bin/common
@@ -389,7 +389,7 @@ Subject: ${subject}
 To: $(join_by ', ' "$@")
 Auto-Submitted: auto-generated
 MIME-Version: 1.0
-Content-Type: multipart/mixed; boundary=${boundary}
+Content-Type: multipart/mixed; boundary="${boundary}"
 
 EOF
         if [[ ${body[@]:-} ]]; then
@@ -406,13 +406,14 @@ EOF
             for a in "${attachment[@]}"; do
                 cat <<EOF
 --${boundary}
-Content-type: text/plain; name="$(basename $a)"
+Content-type: text/plain; charset=utf-8; name="$(basename $a)"
 
 EOF
                 cat "$a" || echo "Failed to attach $a"
             done
         fi
         cat <<EOF
+Content-Type-Encoding: 8bit
 --${boundary}--
 EOF
     ) | /usr/sbin/sendmail -i -- "$@" || :
-- 
2.32.0

Attachment: signature.asc
Description: PGP signature

Reply via email to