My code takes an input of emails that looks like this:
and tries to send them an email using the following code.
function sendEmail(form) {
var ss = SpreadsheetApp.getActive();
var body = form.body;
var bcc = form.bccfield;
var cc = form.ccfield;
var to = form.tofield;
var subject = form.subject;
var eHandle = ss.getSheetByName("Email Handling");
var sig = eHandle.getRange(10, 2).getValue();
var img = eHandle.getRange(11, 2).getValue();
var sigImage = '<img src ="' + img + '" >';
MailApp.sendEmail({
to: to,
cc: cc,
bcc: bcc,
subject: subject,
htmlBody: body.replace(/\n/g, '<br>') + sig + sigImage});
}
It seemed to always be working but now I'm trying to send to a class list of parents (about 55 at a time) and it just doesn't send anything (the code doesn't even finish). I am GSuite for Education so I should have a limit of over 1,000 recipients per day.
I'm pretty sure the only difference which now causes a problem is the number of recipients.
.getRemainingQuota()
say? – TheMaster