我写了以下代码:
function formSubmitReply(e) {
var userEmail = e.values[7];
//var file = DriveApp.getFileById('SWAD_agenda_2014.pdf');
//var userFirstName = e.values[2];
MailApp.sendEmail(userEmail,
//subject line text
"Online Spotter Class Registration",
//body of email
"Congratulations! " + "You are ALMOST fully registered to attend the online \n" +
"spotter class on Monday, September 22nd 2014 at 630 pm! \n\n" +
"Please finish your registration for the class by clicking on the following link: \n" +
"https://www1.gotomeeting.com/register/413777265 \n\n" +
"Once you do, GoToMeeting will send you an email with a link to click on. \n" +
"When you're ready, click on that link and there will be a small download \n" +
"to allow you to participate through GoToMeeting. There will be time to \n" +
"do this just before we begin, if you so choose. \n\n" +
"Remember, if you want to actively participate, you will need a \n" +
"microphone. It is not necessary, though. You can just listen and watch, \n" +
"if you want.\n\n" +
"We look forward to 'seeing' you then!\n\n" +
"NWS Nashville",
{name:"NWS Nashville"});
}
我的触发器设置为在收到时提交。 e.value
是7,这是我的电子表格中的第7列,不包括时间戳。
我一直收到此错误电子邮件:
Start Function Error Message Trigger End
9/4/14 1:48 PM formSubmitReply Invalid email: undefined (line 5, file "Code") formSubmit 9/4/14 1:48 PM
此代码之前有效,我很难理解为什么它不再起作用了。请帮忙。