Is the GmailApp API send limit the same as MailApp?

2.4k Views Asked by At

I have a free tool for teachers that sends emails to each student in the class about the impact of an upcoming homework assignment on their grade (a 'grade nudge', so each email is custom to the student). This tool sends these emails through GmailApp.sendEmail method and the script executes under the user's (teacher's/professor's in this context) Google account.

While a lot of universities have G Suite accounts (where a limit of 1500 is effectively so large it doesn't matter), not all of them do. Some users are using their personal @gmail.com accounts to send this set of emails (where the limit is 100; many classes have more than 100 students). Notably, Google appears to have decreased the limit on the consumer accounts recently (or at least start enforcing it more stringently).

I'd like to improve the behavior here. At a minimum, I'd like to prevent the user from attempting to send more emails than their quota and getting a nasty error. The MailApp class has getRemainingDailyQuota(), while GmailApp does not. Obviously, I can get a number from MailApp.getRemainingDailyQuota(), I have no idea if it is the 'right' number. So...

Is there one quota for MailApp and GmailApp? Does MailApp.getRemainingDailyQuota() reflect the correct remaining sends even if you are sending over GmailApp?

0

There are 0 best solutions below