Keeping track of time-based quotas for thousands of users is a tricky job. How our servers ensure that we know how much of your quota has been used is programmatically straightforward - yet we understand the detail can seem confusing.

There is a simple outline to give an overview of volumes. The actual programmatic calculation is more complex - both of these are shown below to help guide you and provide a more detailed explanation if you want to know the formulae.

The simple overview

The Bulk mail quota is calculated on a rolling average over 7 days.

It calculates the number of emails sent over the last period to the current time, so if checking at 4pm one day, any emails sent BEFORE 4pm 7 days ago no longer count.

An example: Using Bulk Email 5000 

23000 emails sent between the current time and 7 days ago = a minimum of 12000 can now be sent. (5000 x 7 = 35,000 total)

Why minimum? It is a minimum because if the account was in the middle of sending a bulk mail this time 7 days ago, then as the time rolls forward, emails sent in that bulk mail will drop outside of the 7 day period being checked, and so more emails may be available to the quota. 

The detail to understand how this all works

We price and size our bulk email service in terms of Daily Emails Sent - but in order to provide a flexible product, we monitor your usage over a number of days that is dependent on the size of the Bulk Email package. This effectively lets you borrow from the future or roll over unused quotas from previous days. The rollover period is 7 days, we call this the Borrowed Quota Period.

However, the monitoring isn't just accomplished by resetting the count on a particular day or time every week/day.

This article explains how and why we measure your quota in the way we do.

Quota Score & Quota Limit

For each Bulk Email account, we keep a track of its Quota Score compared with its Quota Limit. The Quota Limit is the daily Bulk Email package size multiplied by the days over which we track that quota. For the sake of our examples here - we'll work with a Bulk Email 1000, which is monitored over 7 days (its Borrowed Quota Period) so has a Quota Limit of 7000.

In addition to keeping the Quota Score, we also keep a record of the time that the last email was sent and the quota score was last updated. This allows us to make time-based decisions.

When an email arrives for a Bulk Email account, if the current Quota Score is greater than the Quota Limit, the email is rejected with a message indicating that the quota has been exceeded.

Quota Score Tracking

If the email is not rejected, then the Quota Score is updated. But we don't just add one to the Quota Score, we adjust it based on the current Quota Score and when it was last updated. So if the Quota Score in our example was currently 7001 when an email arrived, but the last email was sent a week ago - it shouldn't be rejected, because time has passed.

The Quota Score is updated by increasing it by the number of emails sent in the current transaction - but decreasing it by a proportion of the Quota Limit based on the proportion of the Borrowed Quota Period that has passed since the last email was sent.

Here is the process

  1. A number of emails arrive in a single transmission
  2. The quota score is checked: if the Quota Score < Quota Limit the email is accepted
  3. The newquota score is calculated:
    1. The Recovery Time is calculated as the time since the last quota update, i.e. (Time now) - (Last time an email was received)
    2. The new quota score is calculated:-
      [current Quota Score]
         + [number of new emails]
      - ( [Quota Limit] * [Recovery Time] / [Borrowed Quota Period]   )
  4. The Quota Score and the new update time are stored for use next time

Example Calculation

For our example account Bulk Email 1000 the Borrowed Quota Period is 7 days, and let's say the current score is 5000 and emails with 100 recipients arrive (the times have been rounded here - but are actually all calculated in seconds):-

  • Package: Bulk Email 1000
  • Borrowed Quota Period: 7 days (168 hours)

(therefore: Quota Limit = 1000 x 7 = 7000 (Bulk Email package quota x borrowed quota period in days) )

  • Time now: 2023-01-02 09:00
  • New emails: 100

Stored information:

  • Current Quota Score: 5000
  • Last update time: 2023-01-01 09:00 (therefore Recovery Time = 24 hours )
  • The new quota score will be calculated as:-
    • Quota Score + new emails - ( Quota Limit * Recovery Time / Borrowed Quota Period )
    • 5000 + 100 - ( 7000 * 24h / 168h )
    • 4100

The new quota score will be stored along with the update time (4100 & 2023-01-02 09:00) for use next time.

From the calculation, you will see:

  • If emails are all sent as quickly as they could be sent, then the 'recovery time' will be 0 and 'quota score' will effectively just count emails until the maximum quota is hit.
  • If emails were sent at a regular average rate of 100 per day, that is 1/700th of the 7-day quota, the quota score will stay static as it will go up by 1 per email and decrease by 7000 * 1/7000 (=1) for each email.
  • If there has been more than 7 days since the last email, the score will go down to 1 - but only when the next email is received.

This method allows us to manage the quota tracking on a Bulk Email account - and we only need to perform any calculations when we receive an email for that account. The downside of this is that if no emails are sent - the current Quota Score will stay as it was when the last email was sent and is only recalculated when the next email arrives.


Need More Help?

If you have any questions, just start a Live Chat, "Click" on the Chat Icon in the lower right corner to talk with our support team.