diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-08-10 15:50:16 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-08-11 08:42:05 -0700 |
commit | fc9884b44474a752adfc8ea2bf7026db39ec6cdb (patch) | |
tree | 172db2a0d4ed3e842ab2433ae6fb13370c71d88e /alot | |
parent | bc2fbd3de71daff918b72e15dac7a0630f817c4c (diff) |
envelope: Allow signing if address is in "name <email>" form
Currently anything except "user@domain" (such as
"User Name <user@domain>"), will not work with the sign command, because
settings.get_account_by_address wants just the "user@domain" bit, and we
don't split it.
Fixes #1113
Diffstat (limited to 'alot')
-rw-r--r-- | alot/commands/envelope.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py index a9cfac74..0294dc01 100644 --- a/alot/commands/envelope.py +++ b/alot/commands/envelope.py @@ -505,8 +505,8 @@ class SignCommand(Command): return else: try: - acc = settings.get_account_by_address( - envelope.headers['From'][0]) + _, addr = email.utils.parseaddr(envelope.headers['From'][0]) + acc = settings.get_account_by_address(addr) except NoMatchingAccount: envelope.sign = False ui.notify('Unable to find a matching account', |