Digest/Activity Summary emails not sending for users even though all conditions are met (Discourse 3.6)

We’re on Discourse 3.6 and seeing an issue where some users who should be receiving digest emails never do.

Here’s what we’ve confirmed for the affected user:

  • enable_digest_emails is true

  • User has been inactive long enough to trigger a digest

  • Email is valid and confirmed

  • No bounce or suppression from the mail provider

  • Other emails (notifications, etc.) send fine

  • No digest email shows up in the Admin → Emails → Sent log

  • When using Admin → Emails → Digest Test, the system correctly shows “Yes, a digest should be sent” — but nothing is actually sent or logged

No related errors appear in Sidekiq or production logs.

Has anyone else seen digest emails silently fail on 3.6 even when all settings and eligibility checks in the admin UI indicate the user should receive one?

have you checked the user’s settings in their preferences-email tab?

Yes here is their setting, and here is the digest rendering for them telling us it should be sent.

Update / Repro Steps (Discourse 3.6)

I ran an explicit repro for this using the Rails console to confirm what’s happening at the job level. Here’s what we see for the affected user:

site: hvac

now: 2025-10-15 17:23:01 UTC

disable_emails: “no”

disable_digest_emails: false

default_email_digest_frequency_minutes: 10080

ENV_DISABLE_EMAILS: nil

perform_deliveries: nil

smtp_address: “smtp.netcorecloud.net

smtp_port: 587

– USER –

id: 42122

username: XXXXXXXXXX

active: true

suspended: false

email_digests: true

digest_after_minutes: 10080

eligible_by_time: true

– LAST 15 EMAIL LOGS –

2025-10-01 | type=digest | bounced=false

2025-09-22 | type=digest | bounced=false

perform_deliveries_now: true

Then when I force-built the digest manually, Discourse thinks it’s building it but returns:

mail = UserNotifications.digest(u)

=> Built digest mail: subject=nil bytes=50

So Discourse thinks it’s building the digest, but it’s actually empty (subject=nil) — and thus silently skipped when the job runs. No EmailLog entry gets created, and nothing is sent.

This confirms:

  • The job enqueues successfully

  • SMTP and deliveries are enabled

  • The digest job exits without error because the mailer returns a blank digest

Running the job inline with:

Jobs::UserEmail.new.execute(“type” => “digest”, “user_id” => u.id”)

produces the same result — no new EmailLog row created.

Possible Cause:

It seems the digest is being skipped due to an “empty digest” condition — maybe something changed in how Discourse 3.6 evaluates content for inclusion. The Admin → Emails → Digest Test view renders the digest correctly, but the background job sees nothing to include.

Summary:

:white_check_mark: Eligible user

:white_check_mark: Active email + valid SMTP

:white_check_mark: Admin Digest Test renders properly

:prohibited: Background digest job silently skips (empty digest)

:prohibited: No EmailLog or send attempt recorded

Would love confirmation from the team — is there possibly a regression in how UserNotifications.digest collects content in 3.6?