Skip to content

Instantly share code, notes, and snippets.

@samuelguebo
Last active October 5, 2022 19:13
Show Gist options
  • Save samuelguebo/f002bb71bb4fae1f9da83787fcb99e0d to your computer and use it in GitHub Desktop.
Save samuelguebo/f002bb71bb4fae1f9da83787fcb99e0d to your computer and use it in GitHub Desktop.
function sendPayStubReminder() {
const monthYear = new Date().toLocaleString('en-us',{month:'long', year:'numeric'})
const senderName = "YOUR-NAME"
const recipientName = "THEIR-NAME"
const recipientEmail = "[email protected]"
const subject = `Need stamped payslip (${monthYear})`
const cc = "[email protected],[email protected]"
let emailBody = `Hello ${recipientName},<br><br/>`
emailBody += `I hope this email finds you well. Do you mind sending my stamped payslip for ${monthYear}?<br/>`
emailBody += 'Kindest regards,<br/>'
emailBody += `${senderName}<br/><br/>`
emailBody += '<b>Note:</b> This is an automated reminder. Please discard it if you have already sent the latest payslip.'
MailApp.sendEmail({
name: senderName,
to: recipientEmail,
cc: cc,
subject: subject,
htmlBody: emailBody
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment