@email-service/email-service
Version:
email-service is a versatile npm package designed to simplify the integration and standardization of email communications across multiple Email Service Providers (ESPs).
29 lines (28 loc) • 1.26 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ESP = void 0;
const normalizeEmailRecipients_js_1 = require("../utils/normalizeEmailRecipients.js");
class ESP {
constructor(service) {
this.mailMultiple = false;
this.transporter = service;
if (this.transporter.logger)
console.log('******** ES ******** New Instance of ', this.transporter.esp);
}
checkRecipients(to) {
return (0, normalizeEmailRecipients_js_1.normalizeRecipients)(to);
}
checkFrom(from) {
return (0, normalizeEmailRecipients_js_1.normalizeFrom)(from);
}
async sendMail(options) {
return ({ success: false, status: 500, error: { name: 'NO_METHOD_sendMail', message: 'This function do never to be call, contact the developper' } });
}
async webHookManagement(req) {
return ({ success: false, status: 500, error: { name: 'NO_METHOD_webHookManagement', message: 'This function do never to be call, contact the developper' } });
}
async sendMailMultiple(options) {
return ([{ success: false, status: 500, error: { name: 'NO_METHOD_sendMail', message: 'This function do never to be call, contact the developper' } }]);
}
}
exports.ESP = ESP;