Update Notification Email Subject (#350)

* update email noti subject

* add improvement to PR template
This commit is contained in:
Johannes
2023-06-09 15:02:57 +02:00
committed by GitHub
parent 4bfaf68de2
commit 93c66c0caf
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -14,6 +14,7 @@ Fixes # (issue)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Chore (refactoring code, technical debt, workflow improvements)
- [ ] Enhancement (small improvements)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change adds a new database migration
+3 -3
View File
@@ -125,7 +125,9 @@ export const sendResponseFinishedEmail = async (
const personEmail = person?.attributes?.find((a) => a.attributeClass?.name === "email")?.value;
await sendEmail({
to: email,
subject: `A response for ${survey.name} was completed ✅`,
subject: personEmail
? `${personEmail} just completed your ${survey.name} survey ✅`
: `A response for ${survey.name} was completed ✅`,
replyTo: personEmail || process.env.MAIL_FROM,
html: withEmailTemplate(`<h1>Survey completed</h1>Someone just completed your survey "${survey.name}"<br/>
@@ -134,8 +136,6 @@ export const sendResponseFinishedEmail = async (
${getQuestionResponseMapping(survey, response)
.map((question) => `<p><strong>${question.question}</strong></p><p>${question.answer}</p>`)
.join("")}
<hr/>