Skip to content

hybernaut/grunt-postmark

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grunt-postmark

Built with Grunt

Send emails through Postmark using GruntJS. You can use this to test your email templates.

Getting Started

This plugin requires that you have a Postmark account.

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-postmark --save-dev

After the plugin is installed, it can be enabled in your Gruntfile:

grunt.loadNpmTasks('grunt-postmark');

Postmark task

Run this task with the grunt postmark command.

Options

serverToken

Your server token can be found on your server’s credentials page on Postmark’s app.

Type: String

from

This is the from address you are using to send the email. This must be a confirmed address that's set up on Postmark’s sender signatures.

Type: String

to

The address you’re sending to.

Type: String

subject

Type: String

Examples

Options specified through target

grunt.initConfig({
  postmark: {
     email: {
       serverToken: 'POSTMARK_API_TEST',
       from: 'you@youremail.com',
       to: 'you@youremail.com',
       subject: 'Yo',
       src: ['test/email.html']
     }
   }
});

Specify options through targets or globally

Options specified through a target will always take precedence over global options.

grunt.initConfig({
  postmark: {
     options: {
       serverToken: 'POSTMARK_API_TEST',
       from: 'you@youremail.com',
       to: 'you@youremail.com',
       subject: 'Yo'
     },
     email: {
       to: 'joe@youremail.com',
       src: ['test/email.html']
     },
     digest: {
       subject: 'Yo',
       src: ['test/email.html', 'test/email2.html']
     }
   }
});

About

Send emails through Postmark using GruntJS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 90.9%
  • JavaScript 9.1%