I pull a html (mail template) from my database. The response is a valid HTML with doctype etc. So now I want to pass the template some variables and store that all into a variable to use it in a service that send a mail with node to some recipient.
How can I do that ?
Mail Template:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
<title>Mail Template</title>
</head>
<body>
{{ variable }}
</body>
</html>