From e3753ab3b371349cf43a138baa95de6cc91791fd Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 15 May 2021 22:46:50 +0200 Subject: mail/envelope: use params when constructing attachments E.g. makes sure the charset is properly set for text attachments. --- alot/mail/envelope.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alot/mail/envelope.py b/alot/mail/envelope.py index 9af4a42b..4d388aac 100644 --- a/alot/mail/envelope.py +++ b/alot/mail/envelope.py @@ -265,7 +265,8 @@ class Envelope: for a in self.attachments: mail.add_attachment(a.data, filename = a.filename, maintype = a.content_maintype, - subtype = a.content_subtype) + subtype = a.content_subtype, + params = { k : v for (k, v) in a.params }) if self.sign: to_sign = mail -- cgit v1.2.3