Email headers showing post ID #

AI-generated summary

Users reported an issue where email subject lines display topic IDs (e.g., ‘Tema #116’) instead of the actual topic title. mingogomes confirmed this behavior and sought help. Jothan_Frakes1 clarified that the topic_title token was incorrectly returning the topic ID. zogstrip noted this wasn’t the first report and asked maja to investigate. maja identified that enabling the private_email setting causes this behavior — it strips post content and replaces the title with a generic format. mingogomes confirmed this was the cause and resolved the issue by disabling the setting. Following this, zogstrip proposed improving the private_email setting’s description for clarity, suggesting it explicitly mention exclusion from both email title and body. codinghorror refined the wording, and zogstrip implemented the change in a commit: https://github.com/discourse/discourse/commit/d51a495dadd09e92f4899f08ccd5e6200102ab29.

Hey guys,

I have seen this tutorial, but I can’t solve this issue.

My email subject is the one that comes by default:
[%{site_name}] %{optional_pm}%{optional_cat}%{topic_title}

But my emails come like this:
[Foro de NewEsc] [Smartphones/Xiaomi] Tema #116

image

So, instead of the Topic Title, it shows the number :open_mouth:

Is there something I Need to change?

Thanks

on email subject line, topic_title token is being sent as the topic id # instead of the actual text of the topic

How does one make the topic text instead of the topic number?

@maja this is not the first report I’ve seen about this issue. Can you try to reproduce?

@mingogomes, do you possibly have private_email setting enabled? That would exclude post content from emails and add a generic title.

I wasn’t able to reproduce the issue with private_email disabled.

Thanks a lot Maja!
It was that indeed :smiley:

Should we improve the copy of the site setting?

We currently have this

Don’t include content from posts or topics in emails for extra privacy. NOTE: also disabled digest emails.

Maybe we should change it to this?

Don’t include content from posts or topics in emails title and body. NOTE: also disables digest emails.

Try

Don’t include content from posts or topics in email title or email body. NOTE: also disables digest emails.

Done in

https://github.com/discourse/discourse/commit/d51a495dadd09e92f4899f08ccd5e6200102ab29