summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-05-15 22:46:50 +0200
committerAnton Khirnov <anton@khirnov.net>2021-05-15 22:46:50 +0200
commite3753ab3b371349cf43a138baa95de6cc91791fd (patch)
tree3090d9001fc1f20f35e5c07adb15eb39a6c512f8
parent1954560bde385757f541cb0310530c95d6a7fe3d (diff)
mail/envelope: use params when constructing attachments
E.g. makes sure the charset is properly set for text attachments.
-rw-r--r--alot/mail/envelope.py3
1 files changed, 2 insertions, 1 deletions
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