From 85416b449936c6537575f64c3653240d25febe95 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 3 Dec 2021 15:08:31 +0100 Subject: mail/envelope: fix Envelope.from_mailto() after header changes Pass them as strings rather than single-element lists. --- alot/mail/envelope.py | 4 ++-- 1 file 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) -- cgit v1.2.3