Help a non-dev customize a subject line?

AI-generated summary

A non-developer user, staceymintcro, seeks help to customize the subject line of a notification email in Discourse, wanting to include the username in the format: USER NAME just made a new post in [%{email_prefix}] %{topic_title}. They tried using %{username} but received an error, as this interpolation key is invalid in the email subject line. simon confirms that %{username} cannot be used in this context and suggests that the issue may require a code adjustment. staceymintcro asks if there’s a way to get Discourse’s attention, and simon reassures them that their post has already reached the Discourse team and that private support is also available.

I’m really sorry to post this, but I’m non-dev and worry I’ll lose a lot of my day trying to figure out how to rewrite the subject line for a notification email.

When a user makes a new post, I’d like to revise the subject line from [%{email_prefix}] %{topic_title} to USER NAME just made a new post in [%{email_prefix}] %{topic_title}

I tried %{username} just added a new post in [%{email_prefix}] %{topic_title but received this error: The following interpolation keys are invalid: “username”.

What am I missing? Many thanks in advance!

I do some Discourse development and am not sure how to find all the available interpolation keys that can be used in the Discourse email templates, so your question is completely valid. There is a similar question here: Customizing specific system email templates - #14.

As far as I know, the %{username} interpolation key cannot be used in the User Posted email template’s subject line. I can’t think of any good workaround for this.

Thanks @simon – is there a way to get Discourse’s attention on this? Am I wrong to think this could be a simple adjustment to their code?

By posting here, you have the attention of the Discourse team. There are several of us who read virtually every post that is created on Meta.

As a customer, you can also get private support by contacting us through the support email address that is given on your site’s admin dashboard.