My application has to send a textfile, which it first has to generate as a String. The text contains non-ASCII symbols, so i would like it to be UTF-8. I\'ve tried a lot of vari
If problem is in file name, rather than in body, following code helped in my (hebrew) case:
MimeBodyPart attachment = new MimeBodyPart(); attachment.setFileName(MimeUtility.encodeText(filename, "UTF-8", null));