Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

encoding non-ASCII in mail subject

843834Apr 18 2008 — edited Apr 19 2008
I'm getting =?ANSI_X3.4-1968?Q? in the subject line of my email with non-ASCII character.
I tried using encodeText from the MimeUtiliy like this but it won't work:
   Message msg = new MimeMessage(session);
            // -- Set the subject and body text --
            msg.setSubject(MimeUtility.encodeText(subject) );
How should I go about?
Thank you
Niklas
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 17 2008
Added on Apr 18 2008
3 comments
762 views