Email notification footer with links for Reply Privately, Sender Profile, and User Profile

To help transition listserv and email users to the online forum, I added the following footer to the reply-by-email notification. I thought I would share.

The email footer

View Thread or reply to this email. Your response will be posted to the site and emailed to the group.

  • Reply to sender privately about this topic.
  • Visit sender’s profile for more info.
  • Update your profile and set your email preferences.
  • View Email Tips for help on posting by email.

How to implement

  • Admin -> Customize -> Text Content
  • Edit user_notifications.reply_by_email
  • Sample code below uses Discourse shortcodes so should work for everyone.
  • Modify the text portions as needed.

Sample code

> [View Thread](%{base_url}%{url}) or reply to this email. Your response will be posted to the site and emailed to the group.

>* [Reply to sender privately](%{base_url}/new-message?username=%{username}) about this topic.
>* [Visit sender's profile](%{base_url}/users/%{username}) for more info.
>* [Update your profile](%{base_url}/my/preferences) and set your email preferences.
>* View [Email Tips]( for help on posting by email.


  • Uses Discourse shortcodes for site title, site URL, topics, usernames, profile page, and compose message.
  • Uses quote markdown for styling
  • Reply privately to sender link will generate a login prompt for non-logged in users. Message composer loads after login.
  • Current limitation (I couldn’t figure it out): Cannot pull specific topic so email subject line is “Your post at {site_title}” Possibly a good thing since it distinguishes it from other topics.
  • Link to topic is included in body of private reply. Might need to tweak for one-boxing.
  • I changed the wording from “View Topic” to “View Thread” (not exactly accurate if there is only one topic and no replies but trying to shift users to the online forum).
  • You can add your own link to a “View Email Tips” post.

Topic is held in topic_title, You can see it defined several times in this file.

One problem I’m seeing is that the spaces in topics are breaking my links - That I haven’t found a solution for.

I have removed some of the IMO unnecessary fanciness in

* [Reply to sender privately](%{base_url}/new-message?username=%{username}&title=Your%20post%20on%20%{site_title}&body=Regarding%20your%20topic%20at%20%{base_url}%{url}) about this topic.

changing it to

* [Reply to sender privately](%{base_url}/new-message?username=%{username}) about this topic.

Because spaces in the site title aren’t being URL encoded, this caused support requests for us. It is also unnecessary; you could simply hard-code the name of your site since the customization is per site anyway, like so:

* [Reply to sender privately](%{base_url}/new-message?username=%{username}&title=Your%20post%20on%EXAMPLE.COM&body=Regarding%20your%20topic%20at%20%{base_url}%{url}) about this topic.

Note that the params are:

  • Title → Your post on EXAMPLE.COM
  • Body → Regarding your topic at

I added two new parameters that can be used in the email notifications:

  • topic_title_url_encoded: Same as topic_title (which is the title of the topic that the notification is about) but encoded so you can use it in links.
  • site_title_url_encoded: The title of your site, encoded for use in links.

An example:

* [Reply to author privately](%{base_url}/new-message?username=%{username}&title=Your%20post%20in%{topic_title_url_encoded}&body=Regarding%20your%20post%20in%20%{base_url}%{url}).


This is Broken in new installations as detailed here

1 Like

Yes, this is still broken. Even in my two year old installation. Any chance that this will be fixed? I’m not sure I understand the workaround….