gulp-sendgrid
v0.0.3
Published
Send email templates to SendGrid
Downloads
14
Maintainers
Readme
gulp-sendgrid
Create SendGrid templates and versions. Works great with Foundation Emails
Install
$ npm install gulp-sendgrid
Usage
var gulp = require('gulp');
var sendgrid = require('gulp-sendgrid');
var config = {
apiKey: "YOUR-API-KEY"
}
gulp.task('default', function () {
return gulp.src(['src/**/*.html','!src/index.html'])
.pipe(sendgrid(config))
.pipe(gulp.dest('dist'));
});
API
sendgrid(config)
config
config.apiKey
Type: String
Default: ''
Required: yes
SendGrid API Key. It should be about 69 characters long. It is NOT your "API Key ID". SendGrid only shows the full API Key once, so if you don't know it, you'll need to create another one.
config.versionPrefix
Type: String
Default: ''
Required: no
If you want to prefix your versions coming from this plugin. The final version name would end up version-prefix-file-name
Troubleshooting
- Make sure you've included your SendGrid API Key — it should be about 69 characters long. It is NOT your "API Key ID" (you'll need to create a new "General" API token if all you see is "API Key ID").
- Make sure you've set the API Key to have "Full Access" to "Transactional Templates"
- Try white-listing your IP from the SendGrid admin
License
MIT © Kevin Kirchner