Discourse Activity Summaries for New Users Created via API

I have created new users using the API. I would like the new users to receive Activity Summaries regardless if they have ever logged in.

Although my users are active, they are not getting these summaries.

What can I do via the API to make sure these user(s) receive these summaries, even if they have never logged in?

I have set zero for “suppress digest email after days” but not sure that will help (default is 365).

Did you wait a long time and/or force the process with Sidekiq?

I suspect that’ll disable summaries, as every user has been not seen for > 0 days.


Thanks @pfaffman.

I had the default frequency set to 1 week. So I just now changed that to 1 day so I don’t have to wait so long to see if it works.

BTW, the only way I know to check if it works is to check the user admin screen for Last Emailed. There are a number of users this morning that were last emailed 6 hours ago, which is around mid-night my time. They have never logged in and I know no one is sending the PMs at that time. Could this be the digest email when I had it set to weekly?

Also interested is I had the “suppress digest email after days” setting set to 0, which it was suggested it turns off digest emails.

Is there another way to check if the digest email is going out for a particular user on the site itself?

I do not know what Sidekiq is. Assuming it is some kind of CLI utility I probably don’t have access since I use Communiteq (formerly DiscourseHosting).

You can check the Sent Emails list in Admin > Emails > Sent (admin/email/sent).


I have confirmed that a summary email has not been sent to users that have not been “Seen” since their account has been created (“Seen” column is blank). However, if the user has logged in (been “Seen”), the email goes out.

Is there any way to cause the email to go out regardless if they have been “Seen” or not, or is there a way to automate they have been “Seen” using the API?

This is the opposite of what you want, you want to change that to multiple years (e.g. a value of 750 days).

Thanks. I have since default it back to 365 but that didn’t help. As I mentioned in my previous post, if the user never logged in (yet is active), they won’t receive activity summary emails.

The other relevant field is “last emailed”. It’s higher priority than “last seen”. Are these users getting emailed about something before a digest email is queued?

Thanks @neil.

What do you mean by “higher priority”? Does Discourse look at “last seen” when considering sending the activity summary?

We will manually send a primary messages to new users registered via the API. From the best I can tell looking at email logs, some are only getting a private message and no activity summary email.

Simply stated, if the user has never been “seen”, they don’t get the activity summary. If they have been “seen”, they might get an email summary.

How can I assure than those who have never been “seen” receive an activity summary email? Or is what I’m asking not possible?

Higher priority:

min_date = opts[:since] || user.last_emailed_at || user.last_seen_at || 1.month.ago

So if we have a last_emailed_at date, then we use that as the cut-off for the earliest post to include in the summary email.

I can’t find logic that would exclude users based on whether their last seen date is null or not… It might be there, but I can’t see why that would be.


Thanks @neil, I’ve been observing the pattern for a while.

I have new, recent users with the following default settings:

Here are the Digest Email settings:

Even though there is content to sent out in a digest email, it hasn’t gone out to users I created three days ago (first two were private messages to new users):

It appears the digest email does not go out for all users, even when the user should get a digest email based on the same exact access as other, active users who do get the digest email.

Do you know what I’d need to do to trigger this digest email all these other users?

Thank you.

Hi @SwisherSweet, just wanted to inform you that @neil is on vacation (well, not really a vacation, he’s moving which is always painful) so he likely won’t be able to get back to you for a week or so.