From c500ddc53533be8168d4a425fe5a7d1d046fcfc7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 22 Dec 2022 21:38:23 +0530 Subject: [PATCH] Add another place where trailing spaces are stripped from destination addresses --- src/calibre/gui2/preferences/emailp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/preferences/emailp.py b/src/calibre/gui2/preferences/emailp.py index 8d41df75ae..bc5731d5c8 100644 --- a/src/calibre/gui2/preferences/emailp.py +++ b/src/calibre/gui2/preferences/emailp.py @@ -147,7 +147,7 @@ class EmailAccounts(QAbstractTableModel): # {{{ elif col == 1: self.accounts[account][0] = re.sub(',+', ',', re.sub(r'\s+', ',', as_unicode(value or '').upper())) elif col == 0: - na = as_unicode(value or '') + na = as_unicode(value or '').strip() from email.utils import parseaddr addr = parseaddr(na)[-1] if not addr or '@' not in na: