Today I've just learned that there are sending quotas in Gmail and Google Apps for Business. Google limits the number of emails you can send each day. It looks like the limit is quite low (100 emails per day) for newly created accounts and increases over time. Currently for us it seems to be 1850 emails a day. Don't ask me how I know.
Here's a useful Google Apps Script that can send a warning email when the quota is closed to being breached. If you know what your quota is...
// Counts the number of emails sent today. If the total exceeds 1600, sends a warning message
function CountSentItems() {
var formattedDate = Utilities.formatDate(new Date(), "GMT", "yyyy/MM/dd");
const mailSearchMax = 500
var mailSearchstart = 0
var sentConversationsCount = 0
while( sentConversationsCount % mailSearchMax == 0){
var conversations = GmailApp.search('in:sent after:' + formattedDate, sentConversationsCount, 500);
if (conversations.length == 0){
break
}
sentConversationsCount += conversations.length
}
if (sentConversationsCount >= 1600) {
GmailApp.sendEmail('blah@blah.blah', '!! Email Quota Warning !!', sentConversationsCount + ' emails have been sent from blah@blah.blah. The Gmail quota is believed to be 1850 per user/per day')
}
}