Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
});
}
sendTemplateMail(to, subject, template, text = null, attachments = [], from, jobOptions = {}) {
return __awaiter(this, void 0, void 0, function* () {
// Generate an HTML email with the provided contents
const emailBody = this.mailGenerator.generate(template);
// Generate the plaintext version of the e-mail (for clients that do not support HTML)
const emailText = text || this.mailGenerator.generatePlaintext(template);
return this.sendMessage(to, subject, emailBody, emailText, attachments, from, jobOptions);
});
}
};
__decorate([
di_1.Inject(),
__metadata("design:type", events_1.EventEmitter)
], NotificationsEmail.prototype, "eventEmitter", void 0);
NotificationsEmail = __decorate([
di_1.Service(),
__param(0, di_1.Inject((type) => logger_1.LoggerFactory)),
__param(1, di_1.Inject((type) => queue_1.QueueFactory)),
__param(2, di_1.Inject((type) => config_1.Config)),
__param(3, di_1.Inject((type) => schema_builder_1.SchemaBuilder)),
__param(4, di_1.Inject((type) => boot_loader_1.BootLoader)),
__metadata("design:paramtypes", [Object, Object, Object, Object, Object])
], NotificationsEmail);
exports.NotificationsEmail = NotificationsEmail;
__param(1, di_1.Inject((type) => events_1.EventEmitter)),
__param(2, di_1.Inject((type) => logger_1.LoggerFactory)),
__param(1, di_1.Inject((type) => events_1.EventEmitter)),
__param(2, di_1.Inject((type) => logger_1.LoggerFactory)),
__param(0, di_1.Inject((type) => events_1.EventEmitter)),
__param(1, di_1.Inject((type) => logger_1.LoggerFactory)),