• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to set Multilanguage Subject in Javax.mail  RSS feed

g ramasubramanian
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I am using javax.mail for my application which handles multi language body content and mail subject.
I am getting UTF-8 String from my database and want to send it in mail as body content and mail subject.(The database is Oracle with UTF-8 enabled)
As for as setting the body content of the mail,the following code worked
msg.setContent(message,"text/plain; charset=UTF-8");
But when i wanted to set the mail subject in UTF-8 format ,the following code sends mail with subject having junk characters.
could any one help how to set up the subject in UTF-8 format.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!