Linh Nguyen
Linh Nguyen

Reputation: 11

How to fix the quota problem of email wotj G Suite account?

I have some a script with trigger set up to send emails daily with GSuite account (about 10 triggers to send about 15 email in total per day, average 6 recipients/email.

However, last few days, I got the alert:

Exception: Service invoked too many times for one day: email

when running the script by trigger or by manually.
I do not think I hit the quota of sending email daily of Google. This morning, when I check the quota remaining by function MailApp.getRemainingDailyQuota(), I only get 4 email remaining. I do not know what happened.

Is there anyone could please help me to solve this problem?

This is the alert I receive:

Your script, AutomaticSendingEmail, has recently failed to finish successfully. A summary of the failure(s) is shown below. To configure the triggers for this script, or change your setting for receiving future failure notifications, click here.

Start             Function                    Error Message                                                                   Trigger End
6/13/20 3:59 PM   send_overtimerequest_email  Exception: Service invoked too many times for one day: email.   time-based  6/13/20 3:59 PM

Sincerely,

Upvotes: 1

Views: 320

Answers (1)

Raserhin
Raserhin

Reputation: 2676

Looking at the page for Apps Script quotas it does specify that the limitations per day is counting recipient (100 recipient/day), so in this case you have no much option. Make sure that you are using the correct account because the limitation for G Suite accounts are 1500 recipient/day. Also check out if this may be applying to you right now:

Note: Newly created G Suite domains are subject to the consumer limit for the first billing cycle if they have six or more users, or several billing cycles if they have fewer users. For more information, see the Help Center page on sending limits.

A workaround that I would suggest is to have a service account and use Domain Wide Delegation to impersonate and user then make use of the Gmal API

Upvotes: 1

Related Questions