Skip to content

Commit 88cdea5

Browse files
committed
fix: allow multiple email addresses
red issue #144
1 parent 4f58107 commit 88cdea5

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

config/default.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ module.exports = {
113113

114114
// the Kafka message topic for sending email
115115
EMAIL_TOPIC: process.env.EMAIL_TOPIC || 'external.action.email',
116-
// the email address for receiving the issue report
117-
REPORT_ISSUE_EMAIL: process.env.REPORT_ISSUE_EMAIL,
116+
// the emails address for receiving the issue report
117+
// REPORT_ISSUE_EMAILS may contain comma-separated list of email which is converted to array
118+
REPORT_ISSUE_EMAILS: (process.env.REPORT_ISSUE_EMAILS || '').split(','),
118119
// SendGrid email template ID for reporting issue
119120
REPORT_ISSUE_SENDGRID_TEMPLATE_ID: process.env.REPORT_ISSUE_SENDGRID_TEMPLATE_ID,
120121
// the URL where TaaS App is hosted

config/email_template.config.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ module.exports = {
1919
`Project URL: ${config.TAAS_APP_URL}/{{projectId}}` + '\n' +
2020
'\n' +
2121
'{{reportText}}',
22-
recipients: [
23-
config.REPORT_ISSUE_EMAIL
24-
],
22+
recipients: config.REPORT_ISSUE_EMAILS,
2523
sendgridTemplateId: config.REPORT_ISSUE_SENDGRID_TEMPLATE_ID
2624
},
2725
/* Report issue for a particular member
@@ -39,9 +37,7 @@ module.exports = {
3937
`Project URL: ${config.TAAS_APP_URL}/{{projectId}}` + '\n' +
4038
'\n' +
4139
'{{reportText}}',
42-
recipients: [
43-
config.REPORT_ISSUE_EMAIL
44-
],
40+
recipients: config.REPORT_ISSUE_EMAILS,
4541
sendgridTemplateId: config.REPORT_ISSUE_SENDGRID_TEMPLATE_ID
4642
}
4743
}

0 commit comments

Comments
 (0)