summaryrefslogtreecommitdiff
path: root/alot/commands/thread.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/commands/thread.py')
-rw-r--r--alot/commands/thread.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index eb95a9bc..0e306eef 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -26,7 +26,6 @@ from .common import RetagPromptCommand
from .envelope import SendCommand
from ..completion.contacts import ContactsCompleter
from ..completion.path import PathCompleter
-from ..db.utils import decode_header
from ..db.utils import formataddr
from ..db.utils import extract_headers
from ..db.utils import extract_body
@@ -158,7 +157,7 @@ class ReplyCommand(Command):
envelope = Envelope(bodytext=mailcontent, replied=self.message)
# copy subject
- subject = decode_header(mail.get('Subject', ''))
+ subject = mail.get('Subject', '')
reply_subject_hook = settings.get_hook('reply_subject')
if reply_subject_hook:
subject = reply_subject_hook(subject)
@@ -224,7 +223,7 @@ class ReplyCommand(Command):
# copy cc for group-replies
if 'Cc' in mail:
cc = clear_my_address(account, mail.get_all('Cc', []))
- envelope.add('Cc', decode_header(', '.join(cc)))
+ envelope.add('Cc', ', '.join(cc))
to = ', '.join(ensure_unique_address(recipients))
logging.debug('reply to: %s', to)
@@ -246,7 +245,7 @@ class ReplyCommand(Command):
envelope.__delitem__('To')
# Finally setup the 'To' header
- envelope.add('To', decode_header(to))
+ envelope.add('To', to)
# if any of the recipients is a mailinglist that we are subscribed to,
# set Mail-Followup-To header so that duplicates are avoided
@@ -258,7 +257,7 @@ class ReplyCommand(Command):
if any(addr in lists for n, addr in getaddresses(allrecipients)):
followupto = ', '.join(allrecipients)
logging.debug('mail followup to: %s', followupto)
- envelope.add('Mail-Followup-To', decode_header(followupto))
+ envelope.add('Mail-Followup-To', followupto)
# set In-Reply-To header
envelope.add('In-Reply-To', '<%s>' % self.message.id)
@@ -347,7 +346,7 @@ class ForwardCommand(Command):
envelope.attach(Attachment(original_mail))
# copy subject
- subject = decode_header(mail.get('Subject', ''))
+ subject = mail.get('Subject', '')
subject = 'Fwd: ' + subject
forward_subject_hook = settings.get_hook('forward_subject')
if forward_subject_hook:
@@ -470,7 +469,7 @@ class EditNewCommand(Command):
to_copy = ['Subject', 'From', 'To', 'Cc', 'Bcc', 'In-Reply-To',
'References']
for key in to_copy:
- value = decode_header(mail.get(key, ''))
+ value = mail.get(key, '')
if value:
envelope.add(key, value)