RGBboy / express-mailer

Send Emails from your application and response object.
103 stars 23 forks source link

Layouts (handlebars.js) #33

Open ajbraus opened 7 years ago

ajbraus commented 7 years ago

Hi there, I'm using Handlebars.js and I want to set my mailer to use the "email.handlebars" layout or I want to use no layout at all. But it is only processing it with my primary "main.handlebars" layout. Is there a way to fix this using express-mailer?

bmxpert1 commented 6 years ago

In case you haven't figured this out or anyone else has this desire, you can change the layout it renders the email with like this:

res.mailer.send('mailers/summary', {
  to: 'someone',
  subject: 'Summary email',
  layout: 'email.handlebars',
}, err => {});