diff options
author | Raphael Kabo <raphaelkabo@gmail.com> | 2022-01-14 18:22:57 +0000 |
---|---|---|
committer | Raphael Kabo <raphaelkabo@gmail.com> | 2022-01-14 18:22:57 +0000 |
commit | 17d829458b371e478d60d3df843e5123cc61a887 (patch) | |
tree | ed242d7b97a73cb8f4392d1441fa07ce22484f39 | |
parent | 77bc35ac8359ffdc1a8bf359bb96b9814e8fe635 (diff) |
Add removal password to new attendee email
-rwxr-xr-x | routes.js | 2 | ||||
-rw-r--r-- | views/emails/addeventattendee.handlebars | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -1307,7 +1307,7 @@ router.post('/attendevent/:eventID', (req, res) => { addToLog("addEventAttendee", "success", "Attendee added to event " + req.params.eventID); if (sendEmails) { if (req.body.attendeeEmail) { - req.app.get('hbsInstance').renderView('./views/emails/addeventattendee.handlebars', { eventID: req.params.eventID, siteName, siteLogo, domain, cache: true, layout: 'email.handlebars' }, function (err, html) { + req.app.get('hbsInstance').renderView('./views/emails/addeventattendee.handlebars', { eventID: req.params.eventID, siteName, siteLogo, domain, removalPassword: req.body.removeAttendancePassword, cache: true, layout: 'email.handlebars' }, function (err, html) { const msg = { to: req.body.attendeeEmail, from: { diff --git a/views/emails/addeventattendee.handlebars b/views/emails/addeventattendee.handlebars index f49c790..971364c 100644 --- a/views/emails/addeventattendee.handlebars +++ b/views/emails/addeventattendee.handlebars @@ -1,7 +1,8 @@ <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">You just marked yourself as attending an event on {{siteName}}. Thank you! We'll send you another email if there are any updates to the event. Your email will be automatically removed from the database once the event finishes.</p> <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Follow this link to open the event page any time: <a href="https://{{domain}}/{{eventID}}">https://{{domain}}/{{eventID}}</a></p> +<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Need to remove yourself from this event? Head to the event page and use this <strong>deletion password</strong>: {{removalPassword}}</p> <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Love,</p> <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">{{siteName}}</p> <hr/> <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;"><strong>Hold up - I have no idea what this email is about!</strong></p> -<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">If you didn't mark yourself as attending an event on {{siteName}}, someone may have accidentally typed your email instead of theirs. Don't worry - there isn't anything you need to do. Your email will be removed from the system when the event finishes.</p> +<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">If you didn't mark yourself as attending an event on {{siteName}}, someone may have accidentally typed your email instead of theirs. If you don't want to attend this event, use the <strong>deletion password</strong> above to remove yourself from the event page.</p> |