title: Customizing Google's MailApp.sendEmail Function
body: <p>I have a 2 part question: First I would like to replace the hardcoded email address with the variable (manager) acquired from the form. I have not been able to get it to work successfully and I believe I am using the wrong formatting.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function sendEmail(e) {
    var email = e.values[1];
    var sub = e.values[2];
    var manager = e.values[3]; 
    var date = e.values[4];
    var checkin = e.values[5];
    var checkout = e.values[6];
    var totalminutes = e.values[7];
    var purpose = e.values[8];
    
    MailApp.sendEmail("&lt;someone@google.com&gt;", "Internal Sub Payment Request", 
                      "What no html?", {htmlBody: html});  
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>The second part is how do I CC someone on this email? When I tried adding it I get the message "Cannot find method sendEmail(string,string,string,string,object). (line 24, file "Code")" </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>MailApp.sendEmail(e.parameter.reply, "Internal Sub Payment Request Status", 
                      "Your manager said: "+ answer); </code></pre>
  </div>
  </div>
  </p>