-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi everyone!!
I have a problem when I send a mail with the javax.mail library and the content of the is an html file. Inside the html file there are spanish symbols and when an email is sent to the recipient,the spanish symbols don't look good.
The funny thing is that if I put <meta charset="UTF-8"> in the html and send the mail from a linux operating system, it displays fine but if I keep this line and run it from a windows operating system it displays badly.
Do you have any idea what might be going on?
my java code:
I'm not sure of the root cause. You might need to set the encoding of your message body part to UTF-8 explicitly. You can do this like:
MimeBodyPart messageBodyPart = new MimeBodyPart();
messageBodyPart.setText(htmlText, "UTF-8", "html");
Asked: 2023-04-28 01:27:00 +0800
Seen: 8 times
Last updated: May 02
This is not zk specific problem
hawk ( 2023-05-03 09:37:15 +0800 )edit