summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
Diffstat (limited to 'alot')
-rw-r--r--alot/commands/globals.py3
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))