Guide to email templates?

(Zach Gambill) #1

Trying to dig through and customize my discourse emails, but I’m not sure what each email does. Is there a guide somewhere that details what the triggers are for each email template?


For example, when a user posts a reply to a topic, which of these templates sends and to whom? My guess is that User Posted goes to the person who posted a reply confirming the post, User Replied goes to others on the thread when a different user posts a reply, and User Quoted switches out the User Replied email. Although now that I’m typing this out, I’m pretty sure I’m wrong. Most of these templates have the same subject line by default and template snippets without visibility as to how they populate in the body, otherwise I would just look at the emails I’ve been getting vs what’s in the template. I also don’t want to test these templates in a live environment, and haven’t setup a dev env yet.

Is there some info/documentation I’m missing? Thanks!

(Jeff Atwood) #2

That is what I would recommend, yes. Search for the text you see in the messages in your email inbox, or on your screen in the Discourse UI.

(Zach Gambill) #3

This is what the default templates look like:

Subject lines are the same for some of them, and I don’t actually know what content/input these variables create since they don’t populate the preview and I’m not sure where they’re defined.

There’s no text in the email that arrives in my inbox that actually persists within the template.

EDIT: I edited the subject line – default is something like [{%site_name}] instead of “Posted!”

(Jerome Spaargaren) #4

I have been reporting issues with this. There seem to be loads of email templates just missing entirely. For example no way of customising group mention emails, and I have just received an uncustomised email notification for watching first topic post on a tag, despite having customised all the available user posted etc email templates.

If you can customise only some of the notification emails but others get through uncustomised and there is no way of customising them, it makes customising emails via email templates virtually unusable, which is why I have posted it as a bug though waiting for a reply…

(Zach Gambill) #5

Agreed – email functionality seems virtually unusable; can’t see the template variables, no info about the triggers, can’t send test emails or effectively use the preview (because it doesn’t populate the variables), no documentation… thinking that it might actually take less time to build a new emailing system on webhooks/db queries than to try to learn discourse email.

(Jeff Atwood) #6

Here’s what I recommend:

  • participate on any Discourse (one you set up, here, or our sandbox at :warning: be sure you set your user preferences to “email me even if I am active on the website”

  • recieve an email notification and think “I’d like to customize what this email says!”

  • visit Admin, Customize, Text and search for the text you see in that email

  • customize it as you see fit

  • repeat until you’re satisfied

Every single line of text and every character you see on-screen is customizable in Discourse. Every single character.

(Elizabeth Beach) #7

Hi @codinghorror I’m having trouble seeing how these steps would work. All of the our email templates have copy resembling:





With no indication of what these variables are (so I can search based on the copy I receive in an email) or what actions trigger what template. Does that information exist anywhere?


(Jerome Spaargaren) #8

Search for the copy you want to edit in the Customize > Text Content tab (rather than Email Templates):


(Christoph) #9

I have not yet found a way to change the date format in digest emails