diff options
author | Lucas Hoffmann <l-m-h@web.de> | 2016-03-12 09:40:26 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2016-03-24 21:01:43 +0000 |
commit | cd88ba39db00abebcc5fcd20a810b6432e9efe01 (patch) | |
tree | 976b6f678af12620b03012f73ab8810b4e81462b /alot | |
parent | c6b5e7ae3c70531b01e9cbb5f5c4af1b020cae8e (diff) |
Clean up recipient string before searching encryption key.
Diffstat (limited to 'alot')
-rw-r--r-- | alot/commands/globals.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py index f5ffe8d7..c7d041ae 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -887,11 +887,12 @@ class ComposeCommand(Command): """ encrypt_keys = [] for recipient in envelope.headers['To'][0].split(','): + recipient = recipient.strip() if not recipient: continue match = re.search("<(.*@.*)>", recipient) if match: - recipient = match.group(0) + recipient = match.group(1) encrypt_keys.append(recipient) logging.debug("encryption keys: " + str(encrypt_keys)) |