调查中出现重复的电子邮件错误

时间:2019-05-15 12:25:02

标签: google-apps-script google-sheets google-apps-script-editor google-form-quiz

答复正确地记录在案,表单所附的Google表格正确填充,并且我收到的确认电子邮件中正确包含了答复。

我还将收到一封重复的电子邮件,以进行覆盖面回复,其中仅包含来自调查的问题以及所有空白的答案字段。怎么了?

代码:

function onFormSubmit(e) {
    try {
        var user_email = e.namedValues["Work Email Address"].toString() ; // Change this to the actual title of your email capture input title.
        var admin_email = "cbetz@prohireresources.com";  // Change this to the email where you want to get new form submission notifications.
        var replyToEmail = "cbetz@prohireresources.com";   //Change this to the email you want user to respond to.
         // Send Email to Admin
        var email_admin = emailTemplateAdmin(e.namedValues);
        var emailArgsAdmin = {name:"Chris Betz", replyTo:replyToEmail, htmlBody:email_admin };  // Change your name to your name.
        MailApp.sendEmail(admin_email,"Georgia FinTech Academy Submission: " + user_email,"",emailArgsAdmin)    // Change the admin email subject.
         // Send Email to Client  
        var email_client = emailTemplateClient(e.namedValues);
        var emailArgsClient = {name:"Chris Betz", replyTo:replyToEmail, htmlBody:email_client };  // Change your name to your name.
        MailApp.sendEmail(user_email, "Thank You, I received your GFTA responses!","",emailArgsClient);    // Change the user's email subject.
     }
     // Send email to Admin in case of ERROR 

作为调查管理员,我应该收到一封电子邮件,其中包含客户的问题和答复。我收到该电子邮件,但我也收到一封重复的电子邮件,其中仅包含问题,但答案字段为空白。

0 个答案:

没有答案