# Summary email limit sent in 1 hour

**URL:** https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402
**Category:** Support
**Created:** [December 6, 2020, 2:22pm UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402 "2020-12-06T14:22:36Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![ozkn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ozkn/32/196013_2.png) [@ozkn](https://meta.discourse.org/u/ozkn)
#### Post date: [December 6, 2020, 2:22pm UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/1 "2020-12-06T14:22:36Z")

</div>

Is the limit of the number of summary e-mails that can be sent up to 1 hour adjustable.  
(sorry for bad english)

---

<div class="post-metadata">

### Author: ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)
#### Post date: [December 7, 2020, 3:27pm UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/2 "2020-12-07T15:27:40Z")

</div>

Not sure I understand what you are referring to , but see [Configuring Activity Summary emails](https://meta.discourse.org/t/discourse-activity-summary-emails-guide/36627) for more details on the summary emails and how they work.

---

<div class="post-metadata">

### Author: ![Jonathan5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jonathan5/32/197134_2.png) [@Jonathan5](https://meta.discourse.org/u/Jonathan5)
#### Post date: [December 7, 2020, 6:49pm UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/3 "2020-12-07T18:49:16Z")

</div>

Likely his email provider only allows x emails per hour and he wants to make sure Discourse sends fewer than that.

Here’s an answer to a similar question: [How to set Email sending speed limit? - #2 by pfaffman](https://meta.discourse.org/t/how-to-set-email-sending-speed-limit/140974/2)

---

<div class="post-metadata">

### Author: ![ozkn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ozkn/32/196013_2.png) [@ozkn](https://meta.discourse.org/u/ozkn)
#### Post date: [December 7, 2020, 7:20pm UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/4 "2020-12-07T19:20:59Z")

</div>

Yes @Jonathan5 I wanted to ask this. thanks for sharing. I will read the subject

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [December 8, 2020, 12:49am UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/5 "2020-12-08T00:49:35Z")

</div>

> [@ozkn](#):
>
> Is the limit of the number of summary e-mails that can be sent up to 1 hour adjustable.  
> (sorry for bad english)

Yes, this is currently easily set for digest emails using a Discourse global setting, for example to set your digests limit to 40 per hour you can set this in your container build file:

```plaintext
 DISCOURSE_MAX_DIGESTS_ENQUEUED_PER_30_MINS_PER_SITE: 20

```

This Discourse global setting for digests defaults to 10,000 every 30 minutes, and if you have a huge number of users, this can send out a lot of digests.

On our site, we use SendGrid (a paid plan) to send out 100,000 digests a month, plus or minus, so we set this to:

100,000 divided by 30 days per month divided by 24 hours a day divided by 2 per hour, so roughly: 60 digests per 30 minutes and it has been working smoothly.

See also:

> <https://github.com/discourse/discourse/blob/main/app/jobs/scheduled/enqueue_digest_emails.rb#L37>

Note: This requires a container rebuild / bootstrap so please consider this before making the change.

---

<div class="post-metadata">

### Author: ![ozkn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ozkn/32/196013_2.png) [@ozkn](https://meta.discourse.org/u/ozkn)
#### Post date: [December 8, 2020, 8:29am UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/6 "2020-12-08T08:29:44Z")

</div>

@neounix thank you so much. I was having a problem with e-mail because I have too many users.  
I bought a mail server myself. There is a limit of 800 emails per hour. I was still having a problem.

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [December 8, 2020, 8:57am UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/7 "2020-12-08T08:57:53Z")

</div>

> [@ozkn](#):
>
> . I was having a problem with e-mail because I have too many users.  
> I bought a mail server myself. There is a limit of 800 emails per hour. I was still having a problem.

You are welcome @ozkn !!

Just set that Discourse global setting to less than 400 per 30 minutes and you should be good to go.

We run digests in a “standalone SMTP channel” based on some monkey-patch’n plugin I wrote:; but since you are running the standard “single SMTP channel” config; you may need to go lower, naturally.

---

<div class="post-metadata">

### Author: ![ozkn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ozkn/32/196013_2.png) [@ozkn](https://meta.discourse.org/u/ozkn)
#### Post date: [December 8, 2020, 9:05am UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/8 "2020-12-08T09:05:27Z")

</div>

I did not risk it I set it to 75. This way, it sends 108,000 mails per month.

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [December 8, 2020, 9:07am UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/9 "2020-12-08T09:07:21Z")

</div>

> [@ozkn](#):
>
> 108,000 mails per month

Digests emails a month…,

This global setting only applies to digests.

🙂

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [December 10, 2020, 1:01pm UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/10 "2020-12-10T13:01:12Z")

</div>

> [@ozkn](#):
>
> I did not risk it I set it to 75. This way, it sends 108,000 mails per month.

Hey @ozkn

OBTW, just to let you know.

I monkey patched the `EnqueueDigestEmails` Job on our main Discourse setup and set the digest Job interval to every 5 minutes versus the Discourse OOTB hardwired 30 minutes.

This meant, in our case, we could set the Global digest limiting var to 10 and send out 10 digests every 5 minutes versus 60 every 30 minutes. This gave me a very small number of, what I consider “advantages” doing it this way:

- there is less load sending out 10 versus 60 at a time (or 50 versus 300, for example).
- the admin email-\>sent log file is easier to read at a glance.
- when we rebuild the container, the job always runs “on startup” so this lower number mitigated the initial job digest run to a much smaller number (since I could not figure out how to get the Discourse config to skip the initial running the job after the container rebuilds).

These are very small advantages, so I don’t recommend most people monkey patch the digest job for this small subjective advantage; but I prefer a 5 minute digest job interval over a 30 minute interval, and after testing for a few days, the mp works great and so, we are going to stay with the every 5 minutes interval.

Just to let you know, as some “small thing” to consider 🙂

---

<div class="post-metadata">

### Author: ![ozkn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ozkn/32/196013_2.png) [@ozkn](https://meta.discourse.org/u/ozkn)
#### Post date: [December 10, 2020, 3:09pm UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/11 "2020-12-10T15:09:22Z")

</div>

@neounix Thanks for your suggestion. where exactly can I make this setting.

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [December 10, 2020, 10:15pm UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/13 "2020-12-10T22:15:36Z")

</div>

Here you go @ozkn

[GitHub - unixneo/discourse-neo-email-digest-monkey-patch: This plugin monkey patches the Discourse digest mailer job (EnqueueDigestEmails) · GitHub](https://github.com/unixneo/discourse-neo-email-digest-monkey-patch)

---

<div class="post-metadata">

### Author: ![ozkn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ozkn/32/196013_2.png) [@ozkn](https://meta.discourse.org/u/ozkn)
#### Post date: [December 10, 2020, 10:28pm UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/14 "2020-12-10T22:28:56Z")

</div>

thank you so much @neounix

---

<div class="post-metadata">

### Author: ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)
#### Post date: [December 11, 2020, 3:52am UTC](https://meta.discourse.org/t/summary-email-limit-sent-in-1-hour/172402/15 "2020-12-11T03:52:28Z")

</div>

> [@ozkn](#):
>
> Thank you so much @neounix

You are welcome @ozkn

If you need further help with this monkey patch, since changing the digest mailer queueing interval from 30 to 5 minutes is not supported by Discourse, please contact me in this topic:

> **[Discourse Digest Mailer (EnqueueDigestEmails) Monkey Patch](https://community.unix.com/t/discourse-digest-mailer-enqueuedigestemails-monkey-patch/381075)**
>
> OOTB, Discourse sets the EnqueueDigestEmails sidekiq job interval to 30 minutes; but I have monkey patched this for the following reasons: There is less load sending out 10 versus 60 at a time (or 50 versus 300, for example). The admin...

I have not yet made this patch a “polished plugin” with a README file and site settings, but in the future, I might make the interval a plugin site setting so it is not hard-wired to 5 minutes.
