diff options
-rw-r--r-- | src/formbox.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/formbox.py b/src/formbox.py index 776b3e0..5e30faf 100644 --- a/src/formbox.py +++ b/src/formbox.py @@ -74,10 +74,8 @@ def render(template, archive, parent): body = get_body(self) if body is None: continue message_id = self['Message-Id'] - try: - author, address = decode(self['From']) - except ValueError: - author = self['From'] + # Please don't have space in email addresses + author = ' '.join(decode(self['From'])).rsplit(maxsplit=1)[0] rendered_children = render(template, archive, message_id) yield template.format(message_id=quote(message_id), mailto_params=urlencode(dict(reply_to(self))), |