function sendFormByEmail (e)
{
var email = "inputemail@address";
var txt = "";
for (var field in e.namedValues) {
txt += field + ' :: ' + e.namedValues[field].toString() + "\n\n";
}
MailApp.sendEmail(email, "input email subject", txt);
}
I believe the following worked once (when filled with a working email address). I then copied and pasted exact same script below the above & added a different email in the hopes that form details could be emailed to two separate people. Then the above didn't work. Tried deleting the second copy of it. This didn't resolve problem. Now am getting the following error when I test run it: TypeError: Cannot read property "namedValues" from undefined. (line 5, file "Email submitted form"). I'm utterly perplexed as I'm pretty sure this is the same script as what was working previously. I must disclose this is the first time I've tried scripting anything in over a decade. I am not a programmer - am a novice, never formally studied coding. Would anyone be able to explain what might be happening in layman's terms to me? Or correct the script if appropriate? Thanks in advance for your time.