• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

How to set Multilanguage Subject in Javax.mail

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
msg.setSubject(subject,"UTF-8");
could any one help how to set up the subject in UTF-8 format.
Thanks
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic