From cd88ba39db00abebcc5fcd20a810b6432e9efe01 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Sat, 12 Mar 2016 09:40:26 +0100 Subject: Clean up recipient string before searching encryption key. --- alot/commands/globals.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'alot') 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)) -- cgit v1.2.3