|
|
|
|
@@ -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) {
|
|
|
|
|
<p>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'}.</p>
|
|
|
|
|
${person.attending ? `<p>Your meal choices are <b>${starters[person.starter]}</b> and <b>${mains[person.main]}</b>.</p>` : ''}
|
|
|
|
|
${person.attending && person.dietary && person.dietary.trim().length > 0 ? `<p>Your dietary requirements are: <b>${person.dietary}</b>.</p>` : ''}
|
|
|
|
|
<p>You can modify your RSVP up until <b>${getRsvpEnd()}</b> <a href="https://danielandhana.com/${person.password}">here</a>.</p>
|
|
|
|
|
<p>You can modify your RSVP up until <b>${prettifyDate(person.enddate)}</b> <a href="https://danielandhana.com/${person.password}">here</a>.</p>
|
|
|
|
|
<p>${person.attending ? 'See you at our wedding,' : 'Hope to see you soon,'}</p>
|
|
|
|
|
<p>Daniel and Hana</p>
|
|
|
|
|
`;
|
|
|
|
|
|