Requirements:
- lodash (or underscore, you may need to change your _ functions to suit)
- Meteor email package
Meteor.startup(function () {
var sendEmail = _.bind(Email.send, Email);
_.extend(Email, {
send: function (options) {
if (/* your custom mail method exists */) {
/* your custom mail method, pull the options you need from `options` */
console.log('CUSTOM MAIL METHOD');
} else {
/* use the SMTP method */
console.log('DEFAULT MAIL METHOD');
sendEmail(options);
}
}
});
});
Thank you!!!!