[issue32182] Infinite recursion in email.message.as_string()

2017-12-01 Thread Silla Rizzoli
Silla Rizzoli added the comment: Ok, thanks! I'm writing a program to convert Outlook for Mac backup files (.olm) into plain mbox files as a way to teach myself Python (and at the same time regain control of my email), so I have tens of thousand of emails to test your new code on, if you

[issue32182] Infinite recursion in email.message.as_string()

2017-11-30 Thread Silla Rizzoli
New submission from Silla Rizzoli : Sometimes RFC-correct email headers do not get folded correctly; the example code below results in an infinite recursion exception. import sys import mailbox from email.message import EmailMessage from email.headerregistry import Address from email import