const config = require('../config'); const helpers = require('../lib/helpers'); const Mailer = require('../lib/Mailer'); module.exports = { confirmation: ({ email, firstName, token }, callback = helpers.emptyFunction) => { const link = `${config.api.url}${config.security.confirm.route}/${encodeURI(token)}`; const mail = { subject: 'Please confirm your account', text: `Please confirm your account\r\r\r\r${firstName},\r\rAn account was recently created on the Eventment giving platform for this email (${email}).\r\rTo complete your registration, please open this link in your browser: ${link}\r\rIf you did not create this account, please disregard this email.`, html: `
${firstName},
An account was recently created on the Eventment giving platform for this email (${email}).
To complete your registration, please click here.If you did not create this account, please disregard this email.
`, }; Mailer(email, mail, callback); }, reset: ({ email, firstName, token }, callback = helpers.emptyFunction) => { const link = `${config.api.url}${config.security.reset.route}/${encodeURI(token)}`; const mail = { subject: 'Please confirm your account', text: `Password Reset Request\r\r\r\r${firstName},\r\rA password reset request was made for your account on the Eventment giving platform.\r\rTo reset your password, please open this link in your browser: ${link}\r\rIf you did not make this request, you may disregard this email and your password will remain unchanged.`, html: `${firstName},
A password reset request was made for your account on the Eventment giving platform.
To reset your password, please click here.If you did not make this request, you may disregard this email and your password will remain unchanged.
`, }; Mailer(email, mail, callback); }, };