I have a .html
email template with + - 700 lines (created in Mailchimp ) and I need to insert some values retrieved from the database (similar to what Velocity does) before sending it to the client.
Although I do not need to enter so much dynamic data like this, I'm looking for some solution on how to do this without having to define the content in php (the string would be huge and would take many lines from my class), I'm using PHPMailer .
Here's an example of what I want to do, in case I put some {VAR} tags to identify where and how I want to change the value of html.
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<p>Olá, {USER}.</p>
<a href="www.dominio.com/validate/{VALIDATE_KEY}" target="_blank">Clique aqui para ativar sua conta.</a>
</body>
</html>