simonhochrein / meteor-mjml

A MJML rendering helper for Meteor.js
11 stars 4 forks source link

Cannot find template #1

Closed MuyBien closed 6 years ago

MuyBien commented 7 years ago

Hi I'm trying to use your plugin but I cannot define the path for the mjml file. I put it on the public folder and give the absolute path /mails/summary.mjml but it cannot find it. And when I put it on the same folder and I give the url ./summary.mjml, I have the same error:

Exception while invoking method 'sendEmail' Error: ENOENT: no such file or directory, open '/mails/summary.mjml'

How can I have to define the path to the mjml file?

Thanks!

simonhochrein commented 7 years ago

Hello and thank you for using my package! This Module uses the fs package from Node.js meaning The root is the root of the filesystem. For the path it should either be ../your path or the assets path. In my projects I store it under meteor_project/private/mjml And I use this script to get the path: https://gist.github.com/8303752 Thank you, Simon

simonhochrein commented 6 years ago

Closing due to inactivity. Please reopen if the problem still exists.