Closed lajpatshah closed 9 years ago
I saw you posted this question in the express-handlebars project as well. Since this plugin uses express-handlebars under the hood, there is no way to do this unless they also support it.
Hi Yads Thanks for looking into the request. However can you help me with my query http://stackoverflow.com/questions/33872486/freshbook-style-email-template-using-nodejs Thanks once again
@lajpatshah you seem to be a bit confused in regards to nodejs and express. It's true that most express view engines need the views to be stored on the file system. However, nothing is inherently stopping you from writing raw html directly to the response or creating raw html emails with Nodemailer. For your use case you can use handlebars or another templating engine directly to generate your emails from any text.
Hi
I have an app which stores user-generated email template in DB & not as .hbs file. The template uses same delimiters as handlebar.
How can I render this template?
Say user has created an invoice email template (using CKEditor & exposed template variables) which I am supposed to send at the time of creating an invoice. I will be saving this template in DB TEXT. Now how do I initialize this template & send the mail.
Thanks
Lajpat