R. David Murray added the comment:
I'm pretty sure this is a duplicate report and that we worked on a fix, but I
don't know if it got committed because I can't find the issue...
(To be clear, the problem here is the lack of whitespace at the start of the
folded part of the header.)
New submission from Andrzej Kubaszek :
email.message - EmailMessage Error
Missing white space after folding on ','
msg['To'] = 'Ab Ć,Ab Ć,Ab Ć,Ab
Ć'
print(msg.as_string())
'''
To: Ab =?utf-8?q?=C4=86?=,Ab =?utf-8?q?=C4=86?=,
Ab =?utf-8?q?=C4=86?=,Ab =?utf-8?q?=C4=86?=
Subject: EmailMessage Err