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 do I change defult template folder "emails" to "email_templates" #297

Closed nicolasxu closed 6 years ago

nicolasxu commented 6 years ago

. ├── app.js └── emails └── mars ├── html.pug └── subject.pug

to ├── app.js └── emails_templates └── mars ├── html.pug └── subject.pug

Below code does not work:

  email.send({
    template:'/email_template/account_created/html.html',
    message: {
      to: 'xu.shenxin@gmail.com'
    }, 
    locals: {
      name: 'nick xu'
    }
  })
nicolasxu commented 6 years ago
views: {
  root: path.resolve('email_template'),
  options: {
    extension: 'html',
    map: {
      html: 'htmling'
    }
  }
}

Sorry, I answered my own question. Thanks!

niftylettuce commented 6 years ago

Great!