How can I dynamically populate html data in node for posting, not displaying?
|Added at||2016-12-29 20:12|
I'm currently trying to populate html data in a file stream so that I can send it in an email using smtpTransport. I've tried to use ejs but almost every example I'm seeing is using ejs.render to display the content while I'm trying to further send it along as a string. I want to do this manually versus using something like mail chimp but I haven't found anything too helpful yet. For context, I'm trying to create a receipt email when a user buys something and populate a table with the items. Here's the code that I've been trying to use with ejs but get a "TypeError: this.templateText.replace is not a function error":
I'm open to using a different platform outside ejs as well.