title: Sending a confirmation email after a google form is submitted
body: <p>I have looked at many resources to figure out what is wrong with my script but nothing is working.  I am trying to send a confirmation email after a google form has been submitted.  It seems like my script is not calling the email address correctly from the form.<br>
  My original script came from <a href="http://acrl.ala.org/techconnect/?p=2343" rel="nofollow noreferrer">http://acrl.ala.org/techconnect/?p=2343</a> and I modified it for my form.<br>
  This is what it looked like:</p>
  
  <pre><code>function swykemailconfirm(e) {
    var userEmail = e.values[10]; //email from column K
    var firstName = e.values[2]; //first name from column C
    var lastName = e.values[1]; //last name from column B
    var test = e.values[4]; //test name from column E
   MailApp.sendEmail(userEmail, 
                      "Thank you " +firstName + lastName + "for signing up to take the " + test + "Show What You Know test. " + 
                      "Make sure you see Ms. May to get your pass. " +
                      "See you on Thursday in room 32 at 3:30." +
                      "The Math Department");
  }
  </code></pre>
  
  <p>I am getting an email with this error message after doing a test form submission:
  Can not find method (class) sendEmail (string, string). (Line 6, file "Code")</p>
  
  <p>After searching here <a href="https://stackoverflow.com/questions/15256019/google-forms-confirmation-script">Google Forms Confirmation Script</a> for a way to edit my script, I used one of the suggestions and changed my code to the following:</p>
  
  <pre><code>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 you " +firstName + lastName + "for signing up to take the " + test + "Show What You Know test. " + 
                      "Make sure you see Ms. May to get your pass. " +
                      "See you on Thursday in room 32 at 3:30." +
                      "The Math Department");
  }
  </code></pre>
  
  <p>I am getting an email with this error message after doing a test form submission:
  TypeError: Can not read property "0" from undefined. (Line 2, file "Code")</p>
  
  <p>Any help is much appreciated!</p>