Customize subject format for standard emails

The only solution I found was to move the subcategories into categories. I also made the category names shorter.

I’d also be interested in only having a field that showed: subcategory OR category. In other words, that would show the subcategory, if available, or the category otherwise.


In the Admin settings, there is a field for “email prefix” - which says “The [label] used in the subject of emails. It will default to ‘title’ if not set.”. I have this set, and my “email subject” set to “%{optional_re}[%{site_name}] %{optional_pm}%{topic_title}” but the former is not used, the site title is used instead.

How does one use the “email prefix” in the subject? Or should I just repeat it explicitly?

Actually, looking back, it appears this might be a regression in around June 2017. At least, that was the time the email subject changed to stop honouring the “email prefix” setting.

I find it amusing when I search for how to do something on Meta and find that I’ve searched for it before (and failed to find a solution):



A post was split to a new topic: Allow adding tags as a custom format for emails

A post was merged into an existing topic: Email headers showing post ID #

Hello, hope you are all keeping well. This is my first post in this forum. So a big hello to you all.

I am here with an issue which I think is quite trivial for you to resolve.
I’ve read this document several times to do permutation and combination with settings but still don’t get a Topic Title in the Email Subject.

Tried both mailing-list mode and non-mode.

All that I get in the subject is “Topic #45” … the number changes for each topic but that is not informative enough.

I’ve configured Amazon SES for email.

In Admin >> Email >> Email Subject
I’ve tried with both these options
%{optional_re}[%{site_name}] %{optional_pm}%{optional_cat}%{topic_title}
and just
but no luck.

Can you kindly advice on what could be done to fix this.
Do let me know if you would need any more info as well.
Thank you.

It sounds like you have enabled secure email mode in your site settings, to prevent any content from leaking out via email? If you do that, then you get the described behavior.


@codinghorror Dear Jeff, many thanks for the valuable reply.
I was off as we had a baby.

What you say makes perfect sense, I quickly went through this discussion, Secure email mode

Kindly advice on how I can disable the secure email setting.
Many thanks once again.

Turn it off in your site settings?

1 Like

Thank you Jeff,
Got it!
Settings>> Email >> Private Email
Adding this for posterity.


At least on my instance, this currently returns tags without the brackets, which can be confusing. I’m not advocating for the brackets though, instead I’d prefer the tags to appear like:

%{optional_tags}#tag1 #tag2 #tag3


I’m really sorry to be this guy, but can someone please explain this like I’m 5? What are %{these} mysterious things?

And more importantly, can someone provide me with a before/ after example of how to properly use the email template editor in the admin settings?

“Before” being an actual email template from the settings, and “after” being an example of a properly edited template that is ready for implementation.

I would really appreciate it!

Edit: bump

Do you know how form letters say “Dear FIRSTNAME, from CITYNAME” … it is like that.

1 Like

Well, my question is how would I correctly modify?

For instance,

for this particular forum, would this exact modification be correct?:


Or would I have to keep site_name in there somewhere?

Also, why in this list of email subjects is [%{site_name}] the only one with [] around it?

[%{site_name}] %{optional_pm}%{optional_cat}%{topic_title}

BTW, is this a specific code language? I could do some research on it if I knew what I was looking for


I have learned the answer to my question!

Sharing it here would help people just like you!

1 Like


Edit: This topic offers a much more succinct summary of my ramblings below :sweat_smile:

Disclaimer – my terminology may be a little inaccurate, but I’m pretty sure I understand the basic idea. Please, correct me if I’m wrong!

Those things → %{} are called variables, and they aren’t language specific. It is basically an automated “value setting tag system” (those are my words, not an official deffinition).

The %{words_inside_the_variable_tag} are the actual variable.

When implemented, the variable tag will search the forum, and automatically replace the tag with its relevant value.

Here’s an example of what they do:

The variable tag %{site_name} as seen in this Welcome User email template

will automatically replace %{site_name} with what ever you have entered in the admin/settings/required/title field seen here:

Notice the description below the /title field – it’s pretty clear if you know what you’re looking at.

Other examples

Let’s say that a user has enabled email notifications in their profile/preferences/email settings.

The User Posted PM email template

is the template that is used to notify a user via email that they have received a personal message in the forum.

When it is time for the forum to implement this email notification, it will automatically summon the User Posted PM template, and pull the relevant values from the [PM] to replace each variable tag in the template.

So the %{topic_title} variable will automatically insert the title of the PM. The %{message} variable will automatically insert the post body of the PM. etc


Turns out, I don’t have to do anything to the variables themselves (which is what I was initially confused about).

If I’m not mistaken, the only things that can be modified in the email templates are:

  • the removing of variables
  • and customizing the plain text body of the template

Pretty neat stuff! :slightly_smiling_face:



is here a bug since Version 2.5.0?

I´ve entered as email subject %{optional_re} [%{site_name}] %{optional_pm} %{topic_title} %{optional_cat}

But only [%{site_name}] %{optional_pm} %{topic_title} works properly.
My members no longer see the categories in the subject.

Best regards


Can we verify this is still working @tshenry? Looks like we are referring to %{optional_re} and %{optional_cat}

1 Like