Plugin outlets for summary emails

With some frequency people want to add something to the Summary emails (e.g., Need advertising added to the newsletter (Digest), and I just did a project where someone wants some data from custom fields added to summary emails). There is currently no way to do that without overwriting the whole template. This is a huge bummer if and when the template changes.

To my naive way of thinking, it seems like the solution to this problem is that there be some stubs in user_notifications.rb like

  def  digest_text_after_logo (user, opts)
   ""
  end

with corresponding stuff in digest (e.g., @after_logo = digest_text_after_logo) and in the template (e.g., @after_logo after the logo before the following table).

I think the places to add stuff include

  • in the header after the logo
  • before “Popular topics”
  • perhap before “New for you”
  • before the footer/unsubscribe links.

All that to say

  1. Do I understand correctly what would need to be done?
  2. would this be a welcome PR?
  3. Would someone who knows the answer to (1) like to submit the PR?
1 Like

Seriously? How often does that template change? This seems like a solution in search of a problem.

1 Like

My guess is that it’ll start changing 3x/week immediately after I count on it not changing. :wink:

https://meta.discourse.org/t/discourse-activity-summary-emails-guide/36627/15?u=pfaffman

But your point is well taken & I’ll proceed as if it’s not likely to change.

I do still wonder if the problem did exist if my solution is on the right track.