Sending a letter using javax.mail.* . I configure the content using an object of type MimeMessage as follows
generateMailMessage.setContent(emailBody, "text/html"); in which emailBody is an object of type String containing the text of the letter, including Cyrillic. But the letter comes as follows: ??????? ??????? ????? ???????! text messag (3.0?) ????? ????: BIA-5083? R, that is, all Cyrillic characters and some others (such as -) are replaced with question marks.
A quick search found a solution to the problem using the method
generateMailMessage.setText(emailBody, ENCODING); where String ENCODING = "koi8-r"; , but in such a letter it is impossible to configure html lines, which is sad.
Is it possible to correctly send a letter containing html tags (which will be displayed correctly) and Cyrillic?