我正在使用Google Spreadsheets的内置API进行脚本编写,以发送一些预订确认信息。如果有人填写了无效的电子邮件,目前我的脚本会停止运行。我希望它只保存一些未被通知的客人数据列表,然后继续循环处理预订。
这是我的当前代码(简化版):
根据文档,
这是我的当前代码(简化版):
// The variables email, subject and msg are populated.
// I've tested that using Browser.msgBox(), and the correct column values are
// found and used
// The script breaks here, if an incorrect email address has been filled in
MailApp.sendEmail(email, subject, msg)
根据文档,
MailApp
类只有发送邮件和检查每日配额两种方法,没有关于检查有效电子邮件地址的内容,因此我不知道这个类接受请求必须满足什么条件,因此无法编写验证程序。