diff --git a/package.json b/package.json index 7d4d6f7..15c0aa4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wedding", - "version": "1.3.0", + "version": "1.3.1", "private": true, "engines": { "node": ">=6.5", diff --git a/src/core/emailer.js b/src/core/emailer.js index 5d1ffb4..65f630c 100644 --- a/src/core/emailer.js +++ b/src/core/emailer.js @@ -1,5 +1,5 @@ import Nodemailer from 'nodemailer'; -import { email, starters, mains, getRsvpEnd } from '../config'; +import { email, starters, mains, prettifyDate } from '../config'; import Rollbar from './rollbar'; import Settings from '../data/models/Settings'; @@ -19,7 +19,7 @@ function getEmailText(person) { Thanks for your RSVP, ${person.attending ? 'we\'re delighted to hear you will be attending' : 'we\'re sorry to hear you will not be attending'}.\n ${person.attending ? `Your meal choices are ${starters[person.starter]} and ${mains[person.main]}.\n` : ''} ${person.attending && person.dietary && person.dietary.trim().length > 0 ? `Your dietary requirements are: ${person.dietary}.\n` : ''} -You can modify your RSVP up until ${getRsvpEnd()} here: https://danielandhana.com/${person.password}.\n +You can modify your RSVP up until ${prettifyDate(person.enddate)} here: https://danielandhana.com/${person.password}.\n ${person.attending ? 'See you at our wedding,' : 'Hope to see you soon,'}\n Daniel and Hana `; @@ -30,7 +30,7 @@ function getEmailHTML(person) {

Thanks for your RSVP, ${person.attending ? 'we\'re delighted to hear you will be attending' : 'we\'re sorry to hear you will not be attending'}.

${person.attending ? `

Your meal choices are ${starters[person.starter]} and ${mains[person.main]}.

` : ''} ${person.attending && person.dietary && person.dietary.trim().length > 0 ? `

Your dietary requirements are: ${person.dietary}.

` : ''} -

You can modify your RSVP up until ${getRsvpEnd()} here.

+

You can modify your RSVP up until ${prettifyDate(person.enddate)} here.

${person.attending ? 'See you at our wedding,' : 'Hope to see you soon,'}

Daniel and Hana

`;