Posted By:
John_Zukowski
Posted On:
Monday, June 25, 2001 12:46 PM
You need to get the string as bytes and then encode the filename yoruself. In addition, you have to do the same for the content type and disposition:
String name = new String(fileName.getBytes());
name = MimeUtility.encodeText(name, "ISO-2022-JP", "B" );
mimeBodyPart.addHeaderLine(
"Content-Type: application/x-Semail; name=""+ name + """);
mimeBodyPart.addHeader(
"Content-Disposition",
"attachment; filename="" + MimeUtility.encodeText(name, "ISO-2022-JP", "B" ) + """);