232402_test_to_dev #1637
|
@ -20,14 +20,18 @@ module.exports = {
|
||||||
options.to = config.app.senderEmail;
|
options.to = config.app.senderEmail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let res;
|
||||||
let error;
|
let error;
|
||||||
return this.transporter.sendMail(options).catch(err => {
|
try {
|
||||||
|
res = await this.transporter.sendMail(options);
|
||||||
|
} catch (err) {
|
||||||
error = err;
|
error = err;
|
||||||
|
|
||||||
throw err;
|
throw err;
|
||||||
}).finally(async() => {
|
} finally {
|
||||||
await this.mailLog(options, error);
|
await this.mailLog(options, error);
|
||||||
});
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
},
|
},
|
||||||
|
|
||||||
async mailLog(options, error) {
|
async mailLog(options, error) {
|
||||||
|
|
Loading…
Reference in New Issue