I am quite new to Javamail and its implementations options.
I am able to send email using it with a variety programs but was unable to do so when including chinese characters as part of the email body, in HTML format.
The email I am trying to send is using a template (txt file) that is saved under UTF-8 encoding. I have tried various steps from the internet and wasn't able to get what I expect to receive.
The chinese characters are either displayed as "???" or "è¦ªæ„›çš„å®¢æˆ¶ï¼š". But in the subject line, I was able to display the chinese characters properly
Below is some part of my code:
public boolean sendEmailNotice (String from, String to, String subject)
I have already tried doing your suggestion but wasn't able to fix the problem. But now, I am able to make my program work. The problem actually occurs not in the emailing part but starts from the process of reading the content of the Template in UTF-8 format.
I tried rewriting the file and produced the same results with the garbled email.