Conversion from MimeMessage to byte array
问题 I need to convert MimeMessage into byte array, but while converting some characters are not coded correctly. Code lookis like this: // message is MimeMessage ByteArrayOutputStream baos = new ByteArrayOutputStream(); message.writeTo(baos); byte[] bytes = baos.toByteArray(); This conversion doesn't work correctly, as output I'm receving wrong formatted email body: <html xmlns=3D"http://www.w3.org/1999/xhtml" xml:lang=3D"en" lang=3D"en" > <body style=3D"background-color: #ffffff;" > ... 3D