I want to send html content in email as text and want to bind some variables into this html content. this html content is saved in my database which i used to send email. so i want to use SpringTemplateEngine's process method which accept template name, and context variables. but i have html content not a template. i want to use thymeleaf template engine for this. but i doesn't understand how can i convert html content for example :
<html>
<head></head>
<title></title>
<body>
<div>
<p>Your ${value1} for ${value2}</p>
</div
</body>
to thymeleaf template by using following method:
String mailTemplate = templateEngine.process("mailTemplate", context);
Please someone help me to overcome this problem.