From 8ab6bb0428902f578a0134dc67f6901f99db3337 Mon Sep 17 00:00:00 2001 From: drfho Date: Wed, 20 Sep 2023 00:31:05 +0200 Subject: [PATCH] sendmail: deal with MIME filenames in chinese or smilies Ref: https://github.com/idasm-unibe-ch/unibe-cms/issues/363 --- Products/zms/standard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Products/zms/standard.py b/Products/zms/standard.py index 3c228dd66..81f8f5bf6 100644 --- a/Products/zms/standard.py +++ b/Products/zms/standard.py @@ -2473,7 +2473,7 @@ def sendMail(context, mto, msubject, mbody, REQUEST=None, mattach=None): part = MIMEAudio(filedata, fileextn) else: part = MIMEApplication(filedata) - part.add_header('Content-Disposition', 'attachment; filename="%s"'%umlaut_quote(filename).replace(' ','_')) + part.add_header('Content-Disposition', 'attachment; filename="%s"'%url_quote(umlaut_quote(filename).replace(' ','_'))) mime_msg.attach(part) # Get MailHost.