…chments. The mail library fails to properly distinguish file attachments from the message body when there are both text and html versions present, instead listing the attachments as another version of the body in another alternative format. Where all three are present it is necessary to explicitly define a separate MIME boundary which distinguishes body versions from attachments.
The mail library encodes filenames with consecutive whitespace such as 'a b.txt' as 'a b.txt', which causes a null pointer exception in Pony.add_attachments. This patch changes the filenames used internally to match those in the mail library.