forwardemail / email-templates

Create, preview (browser/iOS Simulator), and send custom email templates for Node.js. Made for @forwardemail, @ladjs, @cabinjs, @spamscanner, and @breejs.
https://forwardemail.net/docs/send-emails-with-node-js-javascript
MIT License
3.66k stars 339 forks source link

Remote template #385

Closed Xoce51 closed 4 years ago

Xoce51 commented 4 years ago

Hi, I tried for the first time NodeJS to send mail with your module, every thing goes fine. But I am facing an issue with templating. To explain my project, I'm using firebase and the trigger to send mail is in a function, deployed for an application. I don't know how and where the files will be deployed so I can't link the template in my scripts (when it will be deployed). So I got and idea, store my .pug file somewhere and doing something like this:

email.send({
    template: 'https://myHost.com/html.pug',
    [...]
})

I hope my proposition is clear !

Thank you

Xoce51 commented 4 years ago

I didn't check but Firebase function send all the files witinin the folder. Closing this not very relevant