Sending a confirmation email after a google form is submitted -


i have looked @ many resources figure out wrong script nothing working. trying send confirmation email after google form has been submitted. seems script not calling email address correctly form.
original script came http://acrl.ala.org/techconnect/?p=2343 , modified form.
looked like:

function swykemailconfirm(e) {   var useremail = e.values[10]; //email column k   var firstname = e.values[2]; //first name column c   var lastname = e.values[1]; //last name column b   var test = e.values[4]; //test name column e  mailapp.sendemail(useremail,                      "thank " +firstname + lastname + "for signing take " + test + "show know test. " +                      "make sure see ms. may pass. " +                     "see on thursday in room 32 @ 3:30." +                     "the math department"); } 

i getting email error message after doing test form submission: can not find method (class) sendemail (string, string). (line 6, file "code")

after searching here google forms confirmation script way edit script, used 1 of suggestions , changed code following:

function swykemailconfirm(e) {   var useremail = e.values["e-mail"][0];   var firstname = e.values[2];   var lastname = e.values[1];   var test = e.values[4];  mailapp.sendemail(useremail,                      "thank " +firstname + lastname + "for signing take " + test + "show know test. " +                      "make sure see ms. may pass. " +                     "see on thursday in room 32 @ 3:30." +                     "the math department"); } 

i getting email error message after doing test form submission: typeerror: can not read property "0" undefined. (line 2, file "code")

any appreciated!

your original function (top) work 1 small modification.

google docs giving error message "cannot find method (class) sendemail (string, string). (line 6, file "code")" because sendemail method requires 3 arguments passed: recipient (string), subject (string), body (string). currently, passing 2 arguments: recipient , body. see documentation here

modify function following , should work!

function swykemailconfirm(e) {   var useremail = e.values[10]; //email column k   var firstname = e.values[2]; //first name column c   var lastname = e.values[1]; //last name column b   var test = e.values[4]; //test name column e   mailapp.sendemail(useremail,        "registration confirmation subject line",       "thank " +firstname + lastname + "for signing take " + test + "show know test. " +        "make sure see ms. may pass. " +       "see on thursday in room 32 @ 3:30." +       "the math department"); } 

hope helps!


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -