move the bind inside
This commit is contained in:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user