I have a google form that has multiple sections and a different set of questions depending on the answer to the first multiple choices. I want to be able to send an email and use a different body message for each of the sections. Below is a snippet of the code
function myFunction(e){
var accountType = e.values[1];
var personName = e.values[2];
var personAddress = e.values[3];
var businessName = e.values[4];
var businessAddress = e.values[5];
var charityName = e.values[6];
var charityAddress = e.values[7];
var subject = "Webform " + accountType + ;
var message = "Application received from " + personName + " of " + personAddress;
MailApp.sendEmail (userEmail, subject, message);
}
I need to have it send a different message (email body) when specific text has been entered into variable "accountType" will create a different email message (body)?