Assume I had a site that are sending emails to its user with the cart contents that are added by the users dynamically, all users have different data. How can I achieve this, since email html template does not support script inside it.
Write a function which takes product data as input and generates the html template
Something like:
function generateHTMLTemplate (product){
return `<div class='name-style'>${product.name}</div>`
}