Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including gulp-razor-emailer with all npm packages installed. Try it out:

var gulpRazorEmailer = require("gulp-razor-emailer")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

gulp-razor-emailer v1.0.0

Gulp extension to parse .cshtml files and send an email followed up then by passing it through the pipeline.

gulp-razor-emailer

Create and send emails through 'mandrill' with Razor syntax (perfect for testing Asp.Net email services)

Install with npm

npm install --save-dev gulp-razor-emailer

Example

var gulp = require('gulp');
var razorEmailer = require('gulp-razor-emailer')('mandrill-api-key');

// Test Model (can be loaded from json)
var model = { 
    Name : 'Erik', 
    Age : 26, 
    Address : { 
        Street : '1414 Valebrook Ln', 
        City : 'Herndon', 
        State : 'VA', 
        Zip : '20170' 
    } 
};

gulp.task('default', function () {
    gulp.src('test.cshtml')
        .pipe(razorEmailer(model))
        .pipe(gulp.dest('dist'));
});

License

MIT @erik5388

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free