# Discourse sending multiple digest mails to users

**URL:** https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015
**Category:** Support
**Tags:** activity-summary
**Created:** [February 4, 2016, 7:13am UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015 "2016-02-04T07:13:45Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![anandm09](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@anandm09](https://meta.discourse.org/u/anandm09)
#### Post date: [February 4, 2016, 7:13am UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/1 "2016-02-04T07:13:46Z")

</div>

After upgrading to latest version (v1.5.0.beta9 +102) we have received various complains from forum members.

They are receiving same email 2-3 times daily from the day of last upgrade

 ![](https://global.discourse-cdn.com/meta/original/3X/0/c/0ca9502b8d1c6cffc9903ca00f2fe6686bb1af2d.png)

How can I fix this?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 4, 2016, 9:40am UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/3 "2016-02-04T09:40:54Z")

</div>

I think you were out of date, I remember updating you. So those are likely old events.

---

<div class="post-metadata">

### Author: ![anandm09](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@anandm09](https://meta.discourse.org/u/anandm09)
#### Post date: [February 4, 2016, 10:57am UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/4 "2016-02-04T10:57:18Z")

</div>

Sorry didn’t catch that, what do you mean?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 4, 2016, 11:12am UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/5 "2016-02-04T11:12:43Z")

</div>

Those emails reflect an earlier point in time when you were on an older version.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [February 4, 2016, 5:01pm UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/6 "2016-02-04T17:01:41Z")

</div>

On a related note, we’re getting similar complaints in the last 48 hours:

> **[Duplicate emails from talk](https://talk.openmrs.org/t/duplicate-emails-from-talk/4573?u=michael)**
>
> Hi all, For the last few days I’ve noticed that I am getting double emailed by talk for every category that I am watching. Is anyone else experiencing this behavior? Do you get this message twice? 🙂 @michael are you aware of this, or did...

**EDIT:** Confirmed in Mandrill logs that a topic creator got 2 apparently-identical notifications about follow-up replies to that topic. User has **all** of the following preferences activated:

- Send me an email when someone messages me
- Send me an email when someone quotes me, replies to my post, mentions my @username, or invites me to a topic
- Send me an email for every new post (unless I mute the topic or category)
- Send me email notifications even when I am active on the site

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 4, 2016, 11:03pm UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/7 "2016-02-04T23:03:23Z")

</div>

Are you on absolute latest? You need to be, if you are experiencing that.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [February 4, 2016, 11:19pm UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/8 "2016-02-04T23:19:24Z")

</div>

Updated earlier today, yes.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 5, 2016, 12:54am UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/9 "2016-02-05T00:54:20Z")

</div>

From what version? The fix requires the proper “last emailed” date to be written to the user records.. @zogstrip can clarify

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [February 5, 2016, 12:56am UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/10 "2016-02-05T00:56:31Z")

</div>

Its totally possible there is another bug here, but it looks like something different, @downey if easily reproducible this should be in its own topic.

Have a look at mail logs in admin, are there duplicates there to the user? 2 reply keys for the same email?

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [February 5, 2016, 4:22pm UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/11 "2016-02-05T16:22:18Z")

</div>

> [@codinghorror](#):
>
> From what version?

We’re running at this commit: [new 'private\_email\_time\_window\_seconds' site setting · discourse/discourse@2d17071 · GitHub](https://github.com/discourse/discourse/commit/2d170712d716f3de8011b33f66be2283318851a2)

> [@sam](#):
>
> Have a look at mail logs in admin

I guess I’m not clear where you’re asking to look … If I filter `/logs` for “mail” I only see a couple errors about creating incoming email posts.

Unfortunately Mandrill logs don’t seem to show the reply-to key. I can confirm that even this morning one of the users with the issue got 2 otherwise-identical reply notification emails, processed by Mandrill during the same minute. Can’t confirm the reply key unless there’s somewhere else I could look.

---

<div class="post-metadata">

### Author: ![Yuun](https://avatars.discourse-cdn.com/v4/letter/y/977dab/32.png) [@Yuun](https://meta.discourse.org/u/Yuun)
#### Post date: [February 5, 2016, 5:03pm UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/12 "2016-02-05T17:03:00Z")

</div>

> [@downey](#):
>
> I guess I’m not clear where you’re asking to look … If I filter /logs for “mail” I only see a couple errors about creating incoming email posts.

I believe @sam is referring to the logs at `/admin/email/sent`, which would presumably be logging any duplicate emails sent out. Although, the reply key field doesn’t appear to have any entries on my site, not sure if that’s new.

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [February 5, 2016, 5:05pm UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/13 "2016-02-05T17:05:23Z")

</div>

Oh hey, thanks! Silly me for looking under “Logs”. 😛

I have reply keys, but there’s nothing correlating them back to specific posts so I can’t tell what the notifications are from there, in order to determine what might be duplicates. And the times are listed as things like “2 hours” instead of precise timestamps so there are many grouped together within that same hour.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [February 5, 2016, 7:13pm UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/14 "2016-02-05T19:13:58Z")

</div>

Ok, I think I have it fixed now. Sorry about that… Sometimes we pass the notification object and other times we only pass the type of the notification.

[https://github.com/discourse/discourse/commit/ea0e63b150f8a8baea62ec86e295efe80368c16e](https://github.com/discourse/discourse/commit/ea0e63b150f8a8baea62ec86e295efe80368c16e)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [January 15, 2017, 8:09am UTC](https://meta.discourse.org/t/discourse-sending-multiple-digest-mails-to-users/39015/15 "2017-01-15T08:09:54Z")

</div>


