I have unicode for Simplified Chinese. I would like to send an email with Chinese subject and content. The content works fine-which converts unicode to Chinese, however the subject alwasys shows unicode instead of Chinese. Can anybody help? Enclosed you can see a part of my code:
session = Session.getInstance(props, null);
MimeMessage message = new MimeMessage( session );
message.setHeader("Content-Type", "text/plain; charset=UTF-8");
message.setFrom( new InternetAddress( from ) );
message.addRecipient( Message.RecipientType.TO, new InternetAddress( to ) );
message.setSubject(subject, "text/plain; charset=utf-8");
BodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setContent( content, "text/html; charset=utf-8" );
Multipart multipart = new MimeMultipart();
multipart.addBodyPart( messageBodyPart );
message.setContent( multipart );
Transport.send( message );
Thanks,
MyDreamGirl