File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 2121  "main" : " Gruntfile.js"  ,
2222  "license" : " MIT"  ,
2323  "devDependencies" : {
24-     "grunt" : " ^0.4.5 " 
24+     "grunt" : " ^1.0.1 " 
2525  },
2626  "keywords" : [
2727    " postmark"  ,
2828    " grunt"  ,
2929    " email" 
3030  ],
3131  "dependencies" : {
32-     "postmark" : " ^1.0.0 " 
32+     "postmark" : " ^1.2.1 " 
3333  }
3434}
Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ module.exports = function(grunt) {
1919    } 
2020
2121    // Postmark lib 
22-     var  postmark  =  require ( 'postmark' ) ( options . serverToken  ||  _data . serverToken ) ; 
22+     var  postmark  =  require ( 'postmark' ) ; 
23+     var  client  =  new  postmark . Client ( options . serverToken  ||  _data . serverToken ) ; 
2324
2425    if  ( this . files . length  >  0 )  { 
2526
@@ -40,15 +41,15 @@ module.exports = function(grunt) {
4041          messages . push ( obj ) ; 
4142        } ) ; 
4243
43-         postmark . batch ( messages ,  function ( err ,  response )  { 
44+         client . sendEmailBatch ( messages ,  function ( err ,  response )  { 
4445          handleResponse ( err ,  response ,  done ) ; 
4546        } ) ; 
4647
4748      }  else  { 
4849        // Send single message 
4950        message . HtmlBody  =  grunt . file . read ( this . filesSrc ) ; 
5051
51-         postmark . send ( message ,  function ( err ,  response )  { 
52+         client . sendEmail ( message ,  function ( err ,  response )  { 
5253          handleResponse ( err ,  response ,  done ) ; 
5354        } ) ; 
5455      } 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments