summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2014-01-17 13:24:20 -0800
committerPatrick Totzke <patricktotzke@gmail.com>2014-01-17 13:24:20 -0800
commit1bebb66a07000248ceb5b08752d9560d210c8965 (patch)
tree86721ade46a04af0cfe8b801ed19e58b9980ed44
parent6ac132d3a00c9f627051b01ebf2ebc87c15b2d06 (diff)
parent4c625ada720123103480895a2e094305e43f2aa8 (diff)
Merge pull request #688 from cinghiopinghio/master
Added `Envelope-To` in the search for my addresses in reply
-rw-r--r--alot/commands/thread.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/alot/commands/thread.py b/alot/commands/thread.py
index 3c03644e..f2e034f2 100644
--- a/alot/commands/thread.py
+++ b/alot/commands/thread.py
@@ -57,9 +57,13 @@ def determine_sender(mail, action='reply'):
assert my_accounts, 'no accounts set!'
# extract list of addresses to check for my address
+ # X-Envelope-To and Envelope-To are used to store the recipient address
+ # if not included in other fields
candidate_addresses = getaddresses(mail.get_all('To', []) +
mail.get_all('Cc', []) +
mail.get_all('Delivered-To', []) +
+ mail.get_all('X-Envelope-To', []) +
+ mail.get_all('Envelope-To', []) +
mail.get_all('From', []))
logging.debug('candidate addresses: %s' % candidate_addresses)