gulp-razor-emailer

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

Usage no npm install needed!

<script type="module">
  import gulpRazorEmailer from 'https://cdn.skypack.dev/gulp-razor-emailer';
</script>

README

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