From edd4330868e03f26fe0f62ef586d18a62972a9fb Mon Sep 17 00:00:00 2001 From: Elias Gutierrez Date: Tue, 2 Mar 2021 20:51:16 -0800 Subject: [PATCH] Changed: the html-to-text import and fixed deprecation for it --- utils/email.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/email.js b/utils/email.js index 68bf6dab..dc9d7ae1 100644 --- a/utils/email.js +++ b/utils/email.js @@ -1,4 +1,4 @@ -const htmlToText = require('html-to-text'); +const { htmlToText } = require('html-to-text'); const nodemailer = require('nodemailer'); const pug = require('pug'); @@ -49,7 +49,7 @@ module.exports = class Email { to: this.to, subject, html, - text: htmlToText.fromString(html) + text: htmlToText(html) }; await this.newTransport().sendMail(mailOptions);