mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 03:01:08 +01:00
fix: email testing and settings change from ACP
- changing email SMTP settings wouldn't apply the first time - "Send Test Email" now will report emailer errors in most cases
This commit is contained in:
committed by
Julian Lam
parent
713f029dc8
commit
2be396ff6e
@@ -181,8 +181,8 @@ async function pushToUids(uids, notification) {
|
||||
}
|
||||
body = posts.relativeToAbsolute(body, posts.urlRegex);
|
||||
body = posts.relativeToAbsolute(body, posts.imgRegex);
|
||||
await async.eachLimit(uids, 3, function (uid, next) {
|
||||
emailer.send('notification', uid, {
|
||||
await async.eachLimit(uids, 3, async (uid) => {
|
||||
await emailer.send('notification', uid, {
|
||||
path: notification.path,
|
||||
notification_url: notification.path.startsWith('http') ? notification.path : nconf.get('url') + notification.path,
|
||||
subject: utils.stripHTMLTags(notification.subject || '[[notifications:new_notification]]'),
|
||||
@@ -190,7 +190,7 @@ async function pushToUids(uids, notification) {
|
||||
body: body,
|
||||
notification: notification,
|
||||
showUnsubscribe: true,
|
||||
}, next);
|
||||
}).catch(err => winston.error('[emailer.send] ' + err.stack));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user