Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

google apps script - Is the GmailApp API send limit the same as MailApp?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...