Skip to content

flyvictor/gulp-template-mandrill

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-template-mandrill

gulp-template-mandrill allows to upload new templates or update existing ones to your Mandrill account via the Mandrill API.

Usage

To use gulp-template-mandrill, do :

gulp.task('mailTemplates', function(){
  return gulp.src(pathToTemplates)
    .pipe(gulpTemplateMandrill({
      key: 'insert mandrill api key here',
      JSONpath: './other/json/' // optional
    }));
});

You need to have a .json file that contains the Mandrill information for your template, with the same name as the html file it refers to. If it's in the same folder as your .html, you don't need to specify JSONpath.

Such as :

templates:
  \- foo.html
  \- foo.json

Where foo.json contains at least a name attribute for the template:

{
  "name": "Example Template",
  "from_email": "[email protected]",
  "from_name": "Example Name",
  "subject": "example subject",
  "code": "<div>example code</div>",
  "text": "Example text content",
  "publish": false,
  "labels": [
    "example-label"
  ]
}

See Mandrill API docs for reference.

Features

  • Add new template
  • Update existing template

TODO

  • Add wordwrap to html2txt

About

Allow Mandrill templates api call through gulp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%