Google App Script (sendmail.gs):
function sendmail(e) { var currentItemResponses = e.response.getItemResponses(); var name = currentItemResponses[0].getResponse(); //姓名 var sex = currentItemResponses[1].getResponse(); //性別 var mail = currentItemResponses[2].getResponse(); //E-MAIL var sexword = (sex=="男")?"先生":"小姐"; MailApp.sendEmail(mail, "報名成功", name + " " + sexword + "您好,\n" + "恭喜您報名成功。"); }
說明:
用於在表單新增寄信的指令碼。
沒有留言:
張貼留言