Skip to content

Commit

Permalink
Website: Update deliver-nurture-emails.js (#21484)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikermcneil authored Aug 22, 2024
1 parent 2fc5602 commit 59c547f
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions website/scripts/deliver-nurture-emails.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,26 @@ module.exports = {
if(user.psychologicalStageLastChangedAt > oneDayAgoAt) {
continue;
} else {
await sails.helpers.sendTemplateEmail.with({
template: 'email-nurture-stage-four',
layout: 'layout-nurture-email',
templateData: {
firstName: user.firstName,
emailAddress: user.emailAddress
},
to: user.emailAddress,
toName: `${user.firstName} ${user.lastName}`,
subject: 'Deploy open-source MDM',
bcc: [sails.config.custom.activityCaptureEmailForNutureEmails],
from: sails.config.custom.contactEmailForNutureEmails,
fromName: sails.config.custom.contactNameForNurtureEmails,
ensureAck: true,
});
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// Note: We commented this out because it was interfering with the ability for leads to flow
// without making reps wait. We can turn it back on when we have a way for Drew to disable
// nurture emails on a per-contact basis from Salesforce.
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
// await sails.helpers.sendTemplateEmail.with({
// template: 'email-nurture-stage-four',
// layout: 'layout-nurture-email',
// templateData: {
// firstName: user.firstName,
// emailAddress: user.emailAddress
// },
// to: user.emailAddress,
// toName: `${user.firstName} ${user.lastName}`,
// subject: 'Deploy open-source MDM',
// bcc: [sails.config.custom.activityCaptureEmailForNutureEmails],
// from: sails.config.custom.contactEmailForNutureEmails,
// fromName: sails.config.custom.contactNameForNurtureEmails,
// ensureAck: true,
// });
emailedStageFourUserIds.push(user.id);
}
}
Expand Down

0 comments on commit 59c547f

Please sign in to comment.