admin管理员组文章数量:1134247
I have a Google Business Starter account. My email limit is 1,500 per day but I'm getting the error code "Exception: Service invoked too many times for one day: email." after I send out 100 emails. I'm curious if there is something wrong with my Apps Script code or if I doing it incorrectly?
function email() {
//Columns from email sheet
var fn = 1;
var email = 2;
var cc1 = 3;
var cc2 = 4;
var submit = 5;
var subject = '';
var emailTemp = HtmlService.createTemplateFromFile("email class");
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName('Signup');
var rowsWithData = sheet.getRange("A2:A").getValues().filter(String).length + 1;
var data = sheet.getRange("A2:F" + rowsWithData).getValues();
//Filters the names and emails of people who need a reminder
data = data.filter(function (r) { return r[submit] == "" });
subject = 'Please opt in or out'
week = 'Ten'
deadline = 'Friday'
data.forEach(function (row) {
emailTemp.fn = row[fn];
var htmlMessage = emailTemp.evaluate().getContent();
GmailApp.sendEmail(
row[email] + "," + row[cc1] + "," + row[cc2],
subject,
"Your email doesn't support HTML.",
{ name: "****", htmlBody: htmlMessage, 'from': aliases[0] }
);
});
}
本文标签: google apps scriptWhy am I hitting email limit with mail mergeStack Overflow
版权声明:本文标题:google apps script - Why am I hitting email limit with mail merge? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736782216a1952661.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论