function sendOneReminder(email, taskName) { if (!email) return; var subject = 'Reminder: ' + taskName + ' is due today'; var body = 'Hi,\n\nThis is a reminder that "' + taskName + '" is due today.\n\n- Task Reminder Bot'; GmailApp.sendEmail(email, subject, body); } function onFormSubmit(e) { // Re-run the reminder pass whenever the task sheet gets a new row. sendReminderEmails(); }