mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-25 02:31:59 -05:00
Improved bulk email service
no-issue Used proper logging
This commit is contained in:
parent
e63083cd32
commit
8503105b39
1 changed files with 3 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
// @ts-check
|
||||
const mailService = require('../mail');
|
||||
const ghostMailer = new mailService.GhostMailer();
|
||||
const common = require('../../lib/common');
|
||||
|
||||
/*
|
||||
* An email address
|
||||
|
@ -11,6 +12,7 @@ const ghostMailer = new mailService.GhostMailer();
|
|||
* An object representing an email to send
|
||||
* @typedef { Object } Email
|
||||
* @property { string } html - The html content of the email
|
||||
* @property { string } subject - The subject of the email
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
|
@ -28,7 +30,7 @@ module.exports = {
|
|||
await ghostMailer.send(messageToSend);
|
||||
} catch (err) {
|
||||
// @TODO log this somewhere with state?
|
||||
console.log(`Oh no! an email failed to send :( ${recipient}`);
|
||||
common.logging.warn(`Oh no! an email failed to send :( ${recipient}`);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue