You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ving.log('jobs').info(`${job.id} found ${roleUsers.length} users to send emails to.`);
20
+
letsucceeded=0;
21
+
letfailures=0;
22
+
for(constuserofroleUsers){
23
+
constvars={
24
+
subject: job.data.subject,
25
+
summary: job.data.summary,
26
+
message: job.data.message,
27
+
};
28
+
try{
29
+
awaitsendMail('generic',{
30
+
options: {to: user.get('email')},
31
+
vars
32
+
});
33
+
succeeded++;
34
+
}
35
+
catch(err){
36
+
failures++;
37
+
ving.log('jobs').error(`${job.id} failed to send email to user ${user.get('id')}${user.get('email')} because ${err.message} with message ${JSON.stringify(vars)}`);
38
+
}
13
39
}
40
+
ving.log('jobs').info(`${job.id} sent ${succeeded} emails with ${failures} failures.`)
0 commit comments