Discourse sending multiple digest mails to users

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

How can I fix this?

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

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

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

2 Likes

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

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

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

Updated earlier today, yes.

1 Like

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

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?

2 Likes

We’re running at this commit: new 'private_email_time_window_seconds' site setting · discourse/discourse@2d17071 · GitHub

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.

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.

1 Like

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

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.

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

3 Likes