If you have errors with wrong attachment names like this:
correct name:
String -> Prüfbericht Hersteller.pdf
fetchstructure object name:
=?ISO-8859-1?Q?Pr=FCfbericht_Hersteller=2Epdf?=
Workaround to reconvert:
imap_mime_header_decode($fetchstructure->dparameters->value)[0]->text
imap_mime_header_decode($filename)[0]->text