Get all mandrill templates from one account and add them to another.
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) {
},
});
A valid Mandrill API key to copy templates from.
'1dTGOXT_JZlGoqRw3Qvy1bpz'
A valid Mandrill API key to copy templates to.
'tzTDP_JZlGoqFw3Rvy1bpw'
An unexpected error occurred.
{
name: 'Mandrill API Error',
message: 'Oops it didnt work',
code: 'E_MANDRILL_API'
}
OK.
{ message: '' }