summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-12-03 15:08:31 +0100
committerAnton Khirnov <anton@khirnov.net>2021-12-03 15:08:31 +0100
commit85416b449936c6537575f64c3653240d25febe95 (patch)
tree029518fab21d53532706bb893fa9ef9db2cbb5ee
parent5a09515d0f0f595a2e6f3662499b324ba63d014d (diff)
mail/envelope: fix Envelope.from_mailto() after header changes
Pass them as strings rather than single-element lists.
-rw-r--r--alot/mail/envelope.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/mail/envelope.py b/alot/mail/envelope.py
index 0a616a57..bd214568 100644
--- a/alot/mail/envelope.py
+++ b/alot/mail/envelope.py
@@ -456,7 +456,7 @@ class Envelope:
to, _, hfields = mailto.partition('?')
to = unquote(to)
if to:
- headers['To'] = [to]
+ headers[HDR.TO] = to
for hfield in hfields.split('&'):
key, _, value = hfield.partition('=')
@@ -469,6 +469,6 @@ class Envelope:
if key == 'Body':
body = value
elif key in cls._MAILTO_SAFE_HEADERS:
- headers[key] = [value]
+ headers[key] = value
return cls(headers = headers, bodytext = body)