How to set subject in UTF-8 format using javax.mail
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   rama_subramanian
Posted On:   Thursday, December 13, 2001 03:41 AM

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    More>>

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

   <<Less

Re: How to set subject in UTF-8 format using javax.mail

Posted By:   Kohinoor_Verma  
Posted On:   Friday, January 18, 2002 12:53 AM

I am facing exactly the same problem. Did you get a solution / work around for it ?
About | Sitemap | Contact