For a variety of reasons the option for mailing list mode users to receive a daily summary email was removed. It turns out there are a handful of communities that relied on this feature and as such it provoked a good discussion about the restoration of the feature. It was mentioned in that topic that I was working on this. Thanks to @lkramer and team for sponsoring this work!
This plugin adds an option to the email preferences for a user and allows them to enable the daily emails. It is NOT dependent on mailing list mode being turned on.
I should note that this essentially takes the code that was removed and wraps it up in plugin form. In the production scenario weโve tested it in we even saw the email text/content customizations automatically pull in without extra work. The only change that was made was the addition of the standalone user preference.
Putting the code back in place is only part of the equation. Itโs to be expected that admins will want to automatically turn this on for users that previously received the email. To do that youโll need SSH access. Then you can follow these steps:
Make sure you have a backup in place. Just to be safe.
Enter the app and start a rails console.
cd /var/discourse
./launcher enter app
rails c
Run this command:
UserOption.where(mailing_list_mode: 'f', email_digests: 't', digest_after_minutes: 1440).pluck(:user_id).each do |id| UserCustomField.find_or_create_by(user_id: id, name: "user_mlm_daily_summary_enabled").update(value: "true") end
EDIT:
It was brought to my attention that the Daily Activity email should probably be turned off for these users as well. To do that, youโll need to run this command as well, but only after the previous one:
UserCustomField.where(name: "user_mlm_daily_summary_enabled", value: "true").pluck(:user_id).each do |id| UserOption.find_by(user_id: id).update(email_digests: 'f') end
Is there any way I could change the words summaries and summary to digests and digest? Like many other interested in this, Iโm migrating a mailing list, and my users are accustomed to โdigestโ. I think thereโs too much potential for confusions with the builtin โactvity summaryโ and this pluginโs โdaily summaryโ.
You can! Go to Admin โ Customize โ Text Content. From there you can search for the strings you find in the locales and make changes to them from there.
Excellent, thanks! I had no idea plugin text could be changed in this way.
Discourse is surprisingly messy with the wordings here. Besides this, I noticed that "digest is still used in the bootstrap message, and in Admin โ Email โ Preview DIGEST. Makes me wonder how many orphaned artifacts are still floating around.
The discussion and screenshots Iโve seen of this feature when it was builtin was that the daily digest was a sub-option of mailing list mode, in the dropdown. Now itโs a separate options, visually at the same level as, and unrelated to mailing mist mode, but the name still says mailing list mode. Does the MLM checkbox and dropdown affect the daily digest? Yesterday I installed the plugin on my test instance and enabled digest mode for my account, but did not enable MLM. No digest has been received.
Out of curiosity, Was this a deliberate change, a side-effect of moving from builtin to plugin functionality, or something else?
Iโm planning to create/activate accounts for me users, and enable daily summary for whomever mailman digest had been enabled. Since there are new accounts, I donโt have any prior values in Discourse to check, so Iโm planning to set feed it a list of user_ids.
Edit: Iโm not sure why I had problems earlier, but for the record, it appears that either of the following will work:
Itโs been a while, but I believe they are independent settings. I do know you would need to wait 24 hours as it checks every hour but only sends out to users who joined the site at that hour of the day. Does that make sense? Itโs designed to prevent an overload of emails going out from the server at once.
Side effect. You could likely get it to work as a single setting but it would require consistent maintenance to make sure it doesnโt break with new versions of Discourse. And thatโs the opposite of what I want in the plugins I build. I do a fair amount of extra work on these to make sure theyโre as future proof as possible.
It makes sense, but it makes it a little hard to predict when the message should arrive.
After waiting another day, it seems clear that no digest messages are being sent. I have accounts with only MLM enabled, ones with MLM and digests enabled, and ones with only digest enabled. I am receiving activity summary emails, and MLM every-comment emails, but not โdaily summaryโ emails. For some accounts the GUI was used, and for others the rails console. Any suggestions on how to troubleshoot where the problem might be?
Iโm not finding anything in the logs, but maybe Iโm not looking in the right place? Within the GUI (Admin โ Logs), I donโt see anything relevant. Same with viewing the contents of /var/discourse/shared/standalone/log/rails/production.log. Under Admin โ Email โ Sent, I do see messages with email type โdigestโ, but they appear to be the builtin activity summary, as they are sent to every inactive account and not exclusively to (or even inclusively to) accounts that have daily summaries enabled. Weโre using Amazon SES for SMTP, and there havenโt been any notifications for bounces or complaints. I just enabled delivery notifications, so within a day Iโll be able to check for positive delivery.
Out of the six entries in /logs, only two arenโt about image optimization. One is Job exception: Validation failed: Badge has already been taken, and the other is Uncaught TypeError: Cannot read property 'show' of undefined Url: https://testforum.example.com/assets/plugin-third-party-7836e591aab88af977dd1de635258536ee999055ba534a632c4b2fe8983b90b7.js. Neither seems relevant to me, but I can add more details if that would be helpful.
if this is the point - @joebuhlig@david - who could do this update, so we could keep this feature part of our installation here at http://forum.esbz.org?