Skip to content

erkkaha/jade-email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Meteor server side email templates with jade

####Installation

meteor add erkkaha:jade-email

####Usage

   // Server startup
   Meteor.startup(function(){
      var path = 'path to your template folder containing foo.jade'
      EmailTemplate.load(path)
   });

   var emailOptions = {
      data:{
         title: 'bar'
      },
      inlineCss: true
   }

   Email.send({
      to: to,
      from: from,
      subject: subject,
      html: EmailTemplate.foo(emailOptions)
    });

####Templates

A good place for templates is in private folder under your app directory. For instance test.jade and test.css in app/private/templates would be mean:

var path = Npm.require('path')
// Server startup
Meteor.startup(function(){
   EmailTemplate.load(path.resolve('./assets/app/templates'));
   console.log(EmailTemplate.test({title:'foo'}));
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published