I have a spreadsheet that I would like to use to manage user profiles. As part of this I need to keep track of people's first aid certification and when it is due for renewal.
A copy of the sheet can be found here.
I have set up a script to email people a reminder but I cannot work out the code actually to have the script email someone when the specific date is due. Basically when the 90 day reminder cell C15 matches the current date the email sends.
Here is my current code:
function emailreminder() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName("Profile");
var subject = "First Aid Renewal";
var message = "You have 90 days until your First Aid runs out. Please renew your First Aid certification before it expires." ;
var email = sheet.getRange("B3").getValue();
MailApp.sendEmail({
to: email,
subject: subject,
body: message,
});
}
conditionandsend mail, then research on each. This is a website for helping resolve/answer programming questions, but not a place to help you program. And as for the part"or I don't understand", why not try to understand them first? You can search those parts you don't understand on this site or ask a question when no useful posts found. - Tiwdon't workin your question, would be better for it gets answer. Please read how-to-ask and mcve. - Tiw