Digest email not working

AI-generated summary

In a support thread titled ‘Digest email not working,’ AndreaG reports that no automatic digest emails are being sent from their Discourse forum (v2.3.0.beta2), despite correct settings and manual previews working. HAWK and itsbhanusharma suggest checking /admin/email/sent and /sidekiq for delivery or queuing issues. AndreaG confirms no digests have been sent since January 3, no queued jobs exist, and manual triggering of Jobs::EnqueueDigestEmails completes instantly with no effect. A client-side JS error is noted but codinghorror confirms it’s unrelated. Eventually, AndreaG discovers the root cause: the setting ‘admin/email/private email’ was mistakenly enabled, which silently disables digest emails for all users. They suggest improving the UI by adding a warning or disabling Activity Summary preferences when this setting is ON. codinghorror agrees and assigns jomaxro, who implements the fix via a commit to the Discourse repository.

I’m setting up a new forum and no digest email are beeing sent out.

Discourse Version: v2.3.0.beta2 +98

  • activity summary for all users: → weekly
  • All users have trust level 1
  • summary preview is correctly working and can manually be sent out
  • Last topics added yesterday in a public category
  • Bootstrap: 0 (disabled)
  • No errors in in the dashboard → Logs → Error logs

There are users who did visit the forum more then 20 days ago and no digest has been yet sent to them.

I don’t know what else to check. Can you help me?

Can you first go to /admin/email/sent and filter by digest to confirm that none are being sent out?

Another good place will be /sidekiq to see if emails are getting queued but not sent.

The last sent digests were on 3. January, since then no one more has been sent out automatically.
In the log I only see digest emails created manually by me.

Every other kind of automatic generated email work perfectly (mailing list, user mentioned, sign in by email, …).

There are no queued job in Sidekiq. I manually triggered Jobs::EnqueueDigestEmails with no results. The job starts and ends after few milliseconds, like it has nothing to process.

This morning I noticed this warning in admin/logs/Error logs I don’t know if it could be related to the digest issue:

Uncaught TypeError: Cannot read property 'users' of undefined
Url: https://forum.bibliotecadelsentiero.org/assets/ember_jquery-cf9339810550f9c92505dfbb37362c58a4a8a83bcee2d99174547b01c06ed7d3.js
Line: 15
Column: 5191
Window Location: https://forum.bibliotecadelsentiero.org/t/argomento-di-prova/167/2

No that is a client-side javascript error, completely unrelated to server-side mailing of digests.

After many trials I found why no email digest have not being send out: I wrongly set admin/email/private email to ON :weary:

image

It’s quite obvious, but let me suggest to put a little additional note in the setting description like (setting this ON will disable digest emails for all users). If set to ON I would also disable the Activity Summary feature in the user preference for all users, because it won’t work.

Sure let’s add that to the copy here @jomaxro

Done via
https://github.com/discourse/discourse/commit/f0414487f086a5316b7fc32847c17cf7ec601f98