From 93c66c0cafde07c877b280126f7f8d500d257166 Mon Sep 17 00:00:00 2001 From: Johannes <72809645+jobenjada@users.noreply.github.com> Date: Fri, 9 Jun 2023 15:02:57 +0200 Subject: [PATCH] Update Notification Email Subject (#350) * update email noti subject * add improvement to PR template --- .github/PULL_REQUEST_TEMPLATE.md | 1 + apps/web/lib/email.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0c20c66e69..f1547a39e3 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -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 diff --git a/apps/web/lib/email.ts b/apps/web/lib/email.ts index 12661378bf..247574da0e 100644 --- a/apps/web/lib/email.ts +++ b/apps/web/lib/email.ts @@ -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(`
${question.question}
${question.answer}
`) .join("")} - -