Sending UTF-8 + HTML messages.
Hi all,
I'm working on sending Turkish email to our customers, notify them that they need to activate their account before using our product. Email should contain a link that customers will click on, and it should be in Turkish. I store all messages in .properties file.
MimeMessage message =new MimeMessage(session);
message.setFrom(new InternetAddress(EMAIL_FROM));
// compose body text
String body += text from .properties file
message.setText(body,"UTF-8");//( 1)
or
message.setContent(body,"text/html");// (2)
I tried both (1) and (2) alternative, when I tried (1) all Turkish text could be rendered properly but it was not in HTML format at all.
When I tried (2), text couldn't rendered in UTF-8 form, but for HTML it worked well.
1)Am I able to use both of 2 these forms in email? or can just use one of them: UTF-8 or HTML.
2) Is there any way that I can set character encoding before sending message out?
Regards,

