【发布时间】:2021-07-28 22:21:56
【问题描述】:
我有一个空的 Google 电子表格 和以下工作 Apps 脚本代码:
// This function SUCCESSFULLY opens a message box whenever a cell is edited, it shows the row of the edited cell.
function onEdit(e) {
Browser.msgBox(e.range.getRow());
}
// This function SUCCESSFULLY sends an email to 'john@doe.com' (this email address is changed for an actual registered address) upon being called.
function myTestFunction() {
MailApp.sendEmail('john@doe.com', 'Test', 'Cell changed');
}
但是,如果我将“onEdit”功能更改为以下内容,它将无法正常工作:
// This function SUCCESSFULLY opens a message box whenever a cell is edited, BUT IT DOES NOT SEND AN EMAIL.
function onEdit(e) {
Browser.msgBox(e.range.getRow());
MailApp.sendEmail('info@bpbl.de', 'Test', 'Cell changed');
}
为什么后者的“onEdit”功能不发送电子邮件?
(是的,我检查了我的remaining daily email quota,还有很多。)
【问题讨论】:
标签: email google-apps-script google-sheets send