1

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>
0

1 Answer 1

1

I don't see a use for Angular in your goal. You're going to need the server to send the email, so why not do what you need in the template server-side as well?

You mentioned Node.js, so using this Node module should be perfect for what you need.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.