wood burning stoves 2.0*
The moose likes Other JSE/JEE APIs and the fly likes How to set Multilanguage Subject in Javax.mail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "How to set Multilanguage Subject in Javax.mail" Watch "How to set Multilanguage Subject in Javax.mail" New topic
Author

How to set Multilanguage Subject in Javax.mail

g ramasubramanian
Greenhorn

Joined: Dec 13, 2001
Posts: 1
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to set Multilanguage Subject in Javax.mail
 
Similar Threads
Simple Text based Email : Problem with Russian Characters
Servlet ,databases & javaMail
Servlet ,databases & javaMail
regarding sending special characters subject line in mail
Attachment FileName not displaying UTF-8 characters correctly