Add another place where trailing spaces are stripped from destination addresses

This commit is contained in:
Kovid Goyal 2022-12-22 21:38:23 +05:30
parent 48d08139de
commit c500ddc535
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -147,7 +147,7 @@ class EmailAccounts(QAbstractTableModel): # {{{
elif col == 1: elif col == 1:
self.accounts[account][0] = re.sub(',+', ',', re.sub(r'\s+', ',', as_unicode(value or '').upper())) self.accounts[account][0] = re.sub(',+', ',', re.sub(r'\s+', ',', as_unicode(value or '').upper()))
elif col == 0: elif col == 0:
na = as_unicode(value or '') na = as_unicode(value or '').strip()
from email.utils import parseaddr from email.utils import parseaddr
addr = parseaddr(na)[-1] addr = parseaddr(na)[-1]
if not addr or '@' not in na: if not addr or '@' not in na: