# Daily limits for outgoing mails per user

**URL:** https://meta.discourse.org/t/daily-limits-for-outgoing-mails-per-user/41458
**Category:** Feature
**Tags:** feedback
**Created:** [2016年三月23日 04:37 UTC](https://meta.discourse.org/t/daily-limits-for-outgoing-mails-per-user/41458 "2016-03-23T04:37:30Z")
**Posts on this page:** 1
**Showing post:** 36

<div class="post-metadata">

### Author: ![gdpelican](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gdpelican/32/81308_2.png) [@gdpelican](https://meta.discourse.org/u/gdpelican)
#### Post date: [2016年三月29日 01:20 UTC](https://meta.discourse.org/t/daily-limits-for-outgoing-mails-per-user/41458/36 "2016-03-29T01:20:18Z")

</div>

Spec is here:

> [@More granular mailing list mode](https://meta.discourse.org/t/more-granular-mailing-list-mode/38107):
>
> I’m making this proposal in response to the following topics: I think the vast majority of the problems & shortcomings discussed in the topics above would be solved by slightly more granular options for the “mailing list mode”. Now that we have the option to [disable mailing list mode] altogether, I think it’s okay to give it a space of its own. I wanna go from this: (yes that’s a mockup but it accurately represents our current layout) (also note how “Send me an email for eve…

PR is here:

> <https://github.com/discourse/discourse/pull/4068>
>
> As discussed here:
> https://meta.discourse.org/t/more-granular-mailing-list-mode/…38107
> 
> As it looks now:
> !\[screen shot 2016-03-09 at 10 03 45 pm\](https://cloud.githubusercontent.com/assets/750477/13630192/ef480fc6-e642-11e5-81e9-4bf30f5d6525.png)
> 
> TODO:
> \- Determining when / how often to send grouped emails
> \- Designing email summary template
> 
> Would particularly like some feedback on the formula for email guesstimation here:
> https://github.com/discourse/discourse/pull/4068/files#diff-08765a4c969575258af3892abcfa35a7R69
> 
> Currently it's looking at the number of posts created over the past week / month (with the past week average weighted 3x the past month average). Could likely do better around removing private messages, whispers, other stuff not visible to the user, etc., but figured I'd start with what was laying around.

Related line of code:

```plaintext
def mailing_list_mode_frequency_estimate
    # average of last 30 days of posts
    @mailing_list_mode_frequency_estimate ||= About.fetch_stats[:posts_30_days].to_f / 30
end

```

As stated it’s really cheap to calc and a mild overestimate, but maybe that’s alright because it’s better to surprise folks with fewer emails rather than surprise them with more.

---

_[View the full topic](https://meta.discourse.org/t/daily-limits-for-outgoing-mails-per-user/41458)._
