ogenzo-widgets
Version:
Ogenzo Payment Node js Module
22 lines (21 loc) • 736 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OgenzoMail = void 0;
const sgMail = require('@sendgrid/mail');
class OgenzoMail {
constructor(apiKey) {
this.apiKey = apiKey;
}
sendEmail(email, from, subject, code, msg) {
sgMail.setApiKey(this.apiKey);
let config = {
to: email,
from: from,
subject: subject,
text: 'and easy to do anywhere, even with Node.js',
html: '<strong>Amount has succefully been recieved</strong>',
};
sgMail.send(Object.assign(Object.assign({}, config), { html: `${msg} <strong>${code}</strong>` }));
}
}
exports.OgenzoMail = OgenzoMail;