From 6f16c8f4c985ed0b31fd5998749c09a6982c3e54 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 24 Jul 2018 16:39:31 -0700 Subject: commands/globals: Convert Address to string for email.utils Email utils apparently assumes it's getting a string, and calls encode directly. This can only be hit if you have a single account configured, not with multiple accounts. Fixes #1277 --- alot/commands/globals.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'alot/commands/globals.py') diff --git a/alot/commands/globals.py b/alot/commands/globals.py index 0f1d6e26..9ebf2859 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -818,7 +818,8 @@ class ComposeCommand(Command): accounts = settings.get_accounts() if len(accounts) == 1: a = accounts[0] - fromstring = email.utils.formataddr((a.realname, a.address)) + fromstring = email.utils.formataddr( + (a.realname, str(a.address))) self.envelope.add('From', fromstring) else: cmpl = AccountCompleter() -- cgit v1.2.3