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.67k stars 337 forks source link

How can I configure formatjs? #221

Closed rochapablo closed 7 years ago

rochapablo commented 7 years ago

I'm trying to use https://formatjs.io/handlebars/ (# Using Named Number Formats), and they set the config like this:

var intlData = {
    locales: 'en-US'
}

var context = {
    price: 1000
};

var html = template(context, {
    data: {intl: intlData}
});

So, using new EmailTemplate(path), where do I can set data: {intl: intlData}?

I'm asking, because I've tried many things, but nothing seems to work (https://github.com/yahoo/handlebars-intl/issues/86).

niftylettuce commented 7 years ago

try v3.x?