From 971b73f853b842dfcfe43bb38aaa4381e6d609a3 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Tue, 26 Oct 2021 09:19:48 -0700 Subject: [PATCH] move the bind inside --- src/mailer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mailer.js b/src/mailer.js index d0713363a..9efa25889 100644 --- a/src/mailer.js +++ b/src/mailer.js @@ -61,7 +61,7 @@ async function sendMail(mailOptions) { } })); - const transportSendMail = util.promisify(transport.sendMail).bind(transport); + const transportSendMail = util.promisify(transport.sendMail.bind(transport)); const [error] = await safe(transportSendMail(mailOptions)); if (error) throw new BoxError(BoxError.EXTERNAL_ERROR, error); debug(`Email "${mailOptions.subject}" sent to ${mailOptions.to}`);