Mandrill.migrateTemplates()

Get all mandrill templates from one account and add them to another.

Usage

Hover over inputs/exits for more info.

var Mandrill = require('machinepack-mandrill');


// Get all mandrill templates from one account and add them to another.

Mandrill.migrateTemplates({

srcApiKey: '1dTGOXT_JZlGoqRw3Qvy1bpz',

destApiKey: 'tzTDP_JZlGoqFw3Rvy1bpw',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

srcApiKey required

A valid Mandrill API key to copy templates from.

'1dTGOXT_JZlGoqRw3Qvy1bpz'
destApiKey required

A valid Mandrill API key to copy templates to.

'tzTDP_JZlGoqFw3Rvy1bpw'

Exits

error

An unexpected error occurred.

{ name: 'Mandrill API Error',
  message: 'Oops it didnt work',
  code: 'E_MANDRILL_API' }
success

OK.

{ message: '' }