1

I am using Java to send a mail including mail.jar. I have french characters in subject of the mail. They are not displaying properly.

Subject: Identifiants à l'école

I am getting response as "Identifiants à l'école".

Code:

Message message = new MimeMessage(mailSession);
message.setSubject(MimeUtility.encodeText(pSubject));
message.setContent(pBody, "text/html ; charset=utf-8");

Note: Host is smtp

Please help me in solving this issue.

Thanks

Java Learner
  • 311
  • 2
  • 10
  • 26

0 Answers0