Skip to content

Commit bccba30

Browse files
committed
Missing subject and body in template & send email
1 parent 969b137 commit bccba30

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/services/TeamService.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ const ResourceBookingService = require('./ResourceBookingService')
1515

1616
const emailTemplates = _.mapValues(emailTemplateConfig, (template) => {
1717
return {
18+
subject: template.subject,
19+
body: template.body,
1820
from: template.from,
1921
recipients: template.recipients,
2022
cc: template.cc,
@@ -320,6 +322,8 @@ async function sendEmail (currentUser, data) {
320322
const dataRecipients = data.recipients || []
321323
const templateRecipients = template.recipients || []
322324
const emailData = {
325+
subject: data.subject || template.subject,
326+
body: data.body || template.body,
323327
// override template if coming data already have the 'from' address
324328
from: data.from || template.from,
325329
// create a set of uniq. recipients & CCs, from both coming data & template

0 commit comments

Comments
 (0)