/** * AutoReply Reg. * * getItemResponses()[nomorlokasi-row] * trim() ==> ambil kata pertama * * Copyright 2022 By eFBe - https://nogino.my.id and Source Script From https://yagisanatode.com */ function onFormSubmit(e) { const responses = e.response; const email = responses.getRespondentEmail().trim(); const firstname = responses.getItemResponses()[0].getResponse(); const lastname = responses.getItemResponses()[1].getResponse().trim(); const title = responses.getItemResponses()[2].getResponse().trim(); //Check if the users just added their first name or full name. //const firstName = (name.indexOf(" ") == -1)? name : name.substring(0,name.indexOf(" ")); //Grab the signature block of the sender's account. NOTE! Requires Gmail API Service to be activated. var signature = Gmail.Users.Settings.SendAs.list("me").sendAs.filter((account) => { if(account.isDefault){ return true} })[0].signature; MailApp.sendEmail({ name: "ICMP", to: email, subject: "Your registration for The 1st ICMP has been successfully submitted", htmlBody: ` `, }); };