From c950e1e65d9073dc54f5b78ec5af1396c81fd58b Mon Sep 17 00:00:00 2001 From: Patrick Totzke Date: Sun, 22 Jan 2017 17:34:51 +0000 Subject: clean up my address from Cc's --- alot/commands/thread.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/alot/commands/thread.py b/alot/commands/thread.py index e4334637..95d8c93b 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -204,7 +204,7 @@ class ReplyCommand(Command): % recipients logging.debug(emsg) else: - recipients = [sender] + recipients = self.clear_my_address([], [sender]) if self.groupreply: # make sure that our own address is not included @@ -212,8 +212,8 @@ class ReplyCommand(Command): MFT = mail.get_all('Mail-Followup-To', []) followupto = self.clear_my_address(my_addresses, MFT) if followupto and settings.get('honor_followup_to'): - logging.debug('honor followup to: %s', followupto) - recipients = [followupto] + logging.debug('honor followup to: %s', ', '.join(followupto)) + recipients = followupto # since Mail-Followup-To was set, ignore the Cc header else: if sender != mail['From']: @@ -223,13 +223,13 @@ class ReplyCommand(Command): if sender_address not in my_addresses: cleared = self.clear_my_address( my_addresses, mail.get_all('To', [])) - recipients.append(cleared) + recipients.extend(cleared) # copy cc for group-replies if 'Cc' in mail: cc = self.clear_my_address( my_addresses, mail.get_all('Cc', [])) - envelope.add('Cc', decode_header(cc)) + envelope.add('Cc', decode_header(', '.join(cc))) to = ', '.join(recipients) logging.debug('reply to: %s', to) -- cgit v1.2.3