summary refs log tree commit diff
path: root/src/formbox.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/formbox.py')
-rw-r--r--src/formbox.py6
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))),