diff options
Diffstat (limited to 'alot/commands/thread.py')
-rw-r--r-- | alot/commands/thread.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py index 21e2721b..3c9c9658 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -119,7 +119,7 @@ class ReplyCommand(Command): :type message: `alot.db.message.Message` :param all: group reply; copies recipients from Bcc/Cc/To to the reply :type all: bool - :param listreply: reply to list + :param listreply: reply to list; autodetect if unset and enabled in config :type listreply: bool :param spawn: force spawning of editor in a new terminal :type spawn: bool @@ -166,6 +166,11 @@ class ReplyCommand(Command): subject = rsp + subject envelope.add('Subject', subject) + # Auto-detect ML + auto_replyto_mailinglist = settings.get('auto_replyto_mailinglist') + if auto_replyto_mailinglist and mail['List-Id']: + self.listreply = True + # set From-header and sending account try: from_header, account = determine_sender(mail, 'reply') @@ -229,7 +234,8 @@ class ReplyCommand(Command): to = mail['To'] logging.debug('mail list reply to: %s' % to) # Cleaning the 'To' in this case - envelope.__delitem__('To') + if envelope.get('To') is not None: + envelope.__delitem__('To') # Finally setup the 'To' header envelope.add('To', decode_header(to)) |