mail-template-sender
Version:
Email - Template - Sender: Renders templates and sends email
21 lines (17 loc) • 413 B
JavaScript
const Provider = require("../core/Provider");
class SendGridProvider extends Provider {
constructor(SGObject = {}) {
super();
this.sendGridMail = SGObject;
}
async send() {
const options = {
to: this.mail.to,
from: this.mail.from,
subject: this.mail.subject,
html: this.body,
};
return this.sendGridMail.send(options);
}
}
module.exports = SendGridProvider;