Some mail clients report the encoding in lowercase ('koi8-r' for Yandex.ru, for instance). This causes an error in Message::processStructure since it appears in uppercase in mb_list_encodings(). The resulting fallback to UTF-8 makes the final message unreadable.
I suggest testing for both lower and uppercase versions of the encoding's name, because mb_convert_encoding seems perfectly fine with both versions.
Some mail clients report the encoding in lowercase ('koi8-r' for Yandex.ru, for instance). This causes an error in
Message::processStructuresince it appears in uppercase inmb_list_encodings(). The resulting fallback to UTF-8 makes the final message unreadable.I suggest testing for both lower and uppercase versions of the encoding's name, because
mb_convert_encodingseems perfectly fine with both versions.