]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
autobuild: Encode text/plain into base64 to wrap long-lines
authorSATOH Fumiyasu <fumiyas@osstech.co.jp>
Tue, 10 Nov 2020 08:15:42 +0000 (17:15 +0900)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 16 Nov 2020 22:43:34 +0000 (22:43 +0000)
MIMEText(text, 'plain', 'utf-8') encodes the text into
base64 and adds 'Content-Transfer-Encoding: base64' header.

Signed-off-by: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Nov 16 22:43:35 UTC 2020 on sn-devel-184

script/autobuild.py

index 24baa0fa9f251225ddcc35d0296da4abe1503506..a76309df8a203f0aa525c506114169f9c9368117 100755 (executable)
@@ -1112,7 +1112,7 @@ def send_email(subject, text, log_tar):
     outer['From'] = options.email_from
     outer['Date'] = email.utils.formatdate(localtime=True)
     outer.preamble = 'Autobuild mails are now in MIME because we optionally attach the logs.\n'
-    outer.attach(MIMEText(text, 'plain'))
+    outer.attach(MIMEText(text, 'plain', 'utf-8'))
     if options.attach_logs:
         with open(log_tar, 'rb') as fp:
             msg = MIMEApplication(fp.read(), 'gzip', email.encoders.encode_base64)