I am using Javamail (javax.mail) to send mails. I successfully adjusted contents of my mail as utf-8. However I could not set subject line as a utf-8 encoded string.
I t
Solved.
mail.setSubject(MimeUtility.encodeText(subject, "utf-8", "B"));
solves it and sends utf-8 encoded mail subjects. \n/
the legal values for "encoding" are "Q" and "B"... The "Q" encoding is recommended for use when most of the characters to be encoded are in the ASCII character set; otherwise, the "B" encoding should be used.
See http://tools.ietf.org/html/rfc2047.