1
I have a template .html
email with +- 700 lines (created on Mailchimp) and need to insert some recovered database values into it (something similar to what the Velocity makes) before sending to the customer.
Although I don’t need to enter as much dynamic data as this, I look for some solution of how to do this without having to define the content in php (the string would be immense and would take many lines from my class), I’m using the Phpmailer.
Here is an example of what I want to do, in case I put some tags {VAR} to identify where and how I want to change the html value.
<!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>