|
我的情况是email client是lotus note.在用java发email后,用户收到后必须自行把encoding转去unicode才能看到内容,可是subject/title还是乱码。有没有人知道怎样可以在不需要自行转换encoding的情况下就能正常显示email内容?
coding的部分大概是这样:
MimeMultipart mp = new MimeMultipart("mixed");
MimeBodyPart bodyPart = new MimeBodyPart();
bodyPart.setHeader("CharSet", "UTF-8");
bodyPart.setHeader("Content-Transfer-Encoding", "quoted-printable");
bodyPart.setContent("<html> <head> <meta http-equiv='Content-Type' content='text/html;charset=UTF-8'> </head> <body>","text/html");
mp.addBodyPart(bodyPart); |
|