I have written a code in which the function sendEmail sends an email which is present in cell E9 in my google sheet which is linked to a form in my website. As a new user enters his/her email in the form that email is reflected in cell E9 in my google sheet. After which i have to manually run the app script to successfully send the email to the mail id present in cell E9. I want this to be automatic so that i don't have to run the app script manually every time a user enters a new email. Please suggest an app script i have little knowledge in these codes so a full executable code will be a great help. Thanks
function sendEmail() {
var ss = SpreadsheetApp.getActiveSpreadsheet()
var sheet1 = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1");
var emailAddress = sheet1.getRange(9,5).getValue();
var subject = "Checking the app script"
var message = "Checking the app script working from indigenious id and drive link https://drive.google.com/file/d/1MdoADqSeudMwMruLJUU32OA5bdtyweiv/view?usp=sharing "
MailApp.sendEmail(emailAddress, subject, message);
}