diff --git a/AutoReplyGform b/AutoReplyGform new file mode 100644 index 0000000..0afc4d1 --- /dev/null +++ b/AutoReplyGform @@ -0,0 +1,265 @@ +/** + * 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: ` + + +
+
+
|
+