Last active
October 5, 2022 19:13
-
-
Save samuelguebo/f002bb71bb4fae1f9da83787fcb99e0d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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