# Summary emails, new users and SSO

**URL:** https://meta.discourse.org/t/summary-emails-new-users-and-sso/143829
**Category:** Support
**Created:** [March 10, 2020, 7:04pm UTC](https://meta.discourse.org/t/summary-emails-new-users-and-sso/143829 "2020-03-10T19:04:08Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![ryan\_m](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_m/32/166742_2.png) [@ryan\_m](https://meta.discourse.org/u/ryan_m)
#### Post date: [March 10, 2020, 7:04pm UTC](https://meta.discourse.org/t/summary-emails-new-users-and-sso/143829/1 "2020-03-10T19:04:09Z")

</div>

My Discourse site is the SSO client of my Wordpress site. Discourse users have been created for members of the Wordpress site as they have logged into Wordpress. Almost no users have actually visited the forum. I have summary emails set to go out every day and retroactively applied the setting to all the existing Discourse users. The issue I am having is that it appears these summaries are only being sent to Discourse accounts that have actually visited the forum at some point. I want users to start getting the Summary Emails as soon as the account exists within Discourse. Is the behavior I am seeing with emails the default behavior and if so how can it be overcome?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [March 10, 2020, 7:52pm UTC](https://meta.discourse.org/t/summary-emails-new-users-and-sso/143829/2 "2020-03-10T19:52:55Z")

</div>

> [@ryan\_m](#):
>
> The issue I am having is that it appears these summaries are only being sent to Discourse accounts that have actually visited the forum at some point.

Do you know if users are having to respond to a Discourse activation email before their first login from WordPress to Discourse? This will be the case if you are not using the default WordPress registration method on your WordPress site. What this means is that the users will not be marked as `active` on Discourse until they have responded to the email. The summary email is only sent to users who have been marked as `active` on Discourse.

---

<div class="post-metadata">

### Author: ![ryan\_m](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_m/32/166742_2.png) [@ryan\_m](https://meta.discourse.org/u/ryan_m)
#### Post date: [March 10, 2020, 8:20pm UTC](https://meta.discourse.org/t/summary-emails-new-users-and-sso/143829/3 "2020-03-10T20:20:26Z")

</div>

There is quite a bit of customization going on with our WordPress registration but all the users I check within Discourse are set to active. However, last emailed and seen are blank.

---

<div class="post-metadata">

### Author: ![ryan\_m](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_m/32/166742_2.png) [@ryan\_m](https://meta.discourse.org/u/ryan_m)
#### Post date: [March 10, 2020, 8:51pm UTC](https://meta.discourse.org/t/summary-emails-new-users-and-sso/143829/4 "2020-03-10T20:51:30Z")

</div>

I wonder if there might be a bug? All my setting seem to be in place. The only thing I can think of is that I set “suppress digest email after days” to 3650 and because my users have never been seen their email is suppressed. I also had email suppressed for all users for a time but that is currently not set.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 10, 2020, 9:27pm UTC](https://meta.discourse.org/t/summary-emails-new-users-and-sso/143829/5 "2020-03-10T21:27:44Z")

</div>

> [@ryan\_m](#):
>
> because my users have never been seen their email is suppressed.

I think that’s it. The summary email shows you the summary of stuff since you last visited. If you’ve never visited, there’s no “since you last visited.”

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [March 10, 2020, 9:41pm UTC](https://meta.discourse.org/t/summary-emails-new-users-and-sso/143829/6 "2020-03-10T21:41:39Z")

</div>

> [@ryan\_m](#):
>
> The only thing I can think of is that I set “suppress digest email after days” to 3650 and because my users have never been seen their email is suppressed.

That seems to be the cause of the problem. [The code](https://github.com/discourse/discourse/blob/master/app/jobs/scheduled/enqueue_digest_emails.rb#L17) is checking this:

```ruby
.where("COALESCE(last_seen_at, '2010-01-01') >= CURRENT_TIMESTAMP - ('1 DAY'::INTERVAL * #{SiteSetting.suppress_digest_email_after_days})")

```

SInce `last_seen_at` will return `nil` for the new user, the code will check to see if ‘2010-01-01’ is greater than 3650 days ago before sending the email. Increasing the value of that setting should solve the issue for you. The risk with setting that value to a large number of days is that you may be sending the summary email to users who have no interest in the site.

---

<div class="post-metadata">

### Author: ![ryan\_m](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_m/32/166742_2.png) [@ryan\_m](https://meta.discourse.org/u/ryan_m)
#### Post date: [March 10, 2020, 10:43pm UTC](https://meta.discourse.org/t/summary-emails-new-users-and-sso/143829/7 "2020-03-10T22:43:58Z")

</div>

It helped a little bit but did not solve the issue. To test things I set the Summary email frequency to 30 minutes and the maximum notifications per day to 1. I set the last seen setting to 365000. Basically users added to Discourse within the last 17 days received emails and a few users that have been seen recently but had been created earlier also received emails. I can confirm that all users are activated -or at least I can from a random selection of users that did not receive emails. Not sure how to fix this. Is there anything I can reset manually?

---

<div class="post-metadata">

### Author: ![ryan\_m](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_m/32/166742_2.png) [@ryan\_m](https://meta.discourse.org/u/ryan_m)
#### Post date: [March 10, 2020, 11:39pm UTC](https://meta.discourse.org/t/summary-emails-new-users-and-sso/143829/8 "2020-03-10T23:39:33Z")

</div>

Did a little more digging and it seems that summary email preferences on most accounts are not being set when I change the frequency. So if I change the summary frequency from 30 minutes to 1 hour and confirm to make the change for all accounts -the setting does not seem to take. I confirmed this by impersonating accounts that do not get the emails. Their preference setting will have summaries turned off.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [February 28, 2024, 7:56pm UTC](https://meta.discourse.org/t/summary-emails-new-users-and-sso/143829/9 "2024-02-28T19:56:50Z")

</div>



---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 28, 2024, 9:24pm UTC](https://meta.discourse.org/t/summary-emails-new-users-and-sso/143829/10 "2024-02-28T21:24:35Z")

</div>


