user2023141
user2023141

Reputation: 1223

java mail html format : how to render German umlaut characters

I'm using Jakarta mail for sending email. The content of the mails are using html/text format. I do this as follow

MimeMessage mimeMessage = new MimeMessage(smtpHost.getSession());
mimeMessage.setContent(text, ""text/html"");

But German Umlaut characters are not rendered correctly. These characters are converted into a question mark.

Freundliche Gr�sse

How can I have German umlaut characters rendered correctly when the content of an email is in format text/html ?

Upvotes: 2

Views: 769

Answers (1)

Beno
Beno

Reputation: 21

hello if you are writing the content you cant use th this https://dev.w3.org/html5/html-author/charref

ü => ü

if you don't you can "replace" the ü for example by ü in the String.

Upvotes: 1

Related Questions