Email subject configuration options

I’d like emails to include the “Re:” in replies to aid subject threading in dumber mail clients (most annoyingly including Apple’s I coded this up and even submitted a pull request (thanks for looking at it @eviltrout). But then one of my users asked if it was possible to add the category to the subject line. I’m not sure I want to do this, but it is certainly reasonably so I’d like to look at adding a user configurable subject line with appropriate parameters available (ala reply by email address “%{reply_key}” token).

This would apply to user_replied, user_quoted, user_mentioned, user_posted - I don’t think the others need further configuration options.

However, one thing I don’t understand though is in the English translations, and a few of the other translations (including zh_CN) all four are the same subject, namely “[%{site_name}] %{topic_title}” - that would mean all four could be done in one setting and no translations are needed.

However in most of the translations (including zh_TW), all four are different and include the username and text about the reply/mention/quote, and even extra text in the normal user_posted subject, eg:

subject_template: “[%{site_name}] %{subject_prefix}%{username} 在 ‘%{topic_title}’ 討論話題發表了文章”

I would assume that irrespective of language, the basic format of all the subjects should be the same, so my guess is that originally, the English originally included custom emails for each type, and this was translated, and then the english removed this and the new translations have taken not, but the old ones remain.

And indeed, looking at the “Blame” history for the line in the english translation shows @sam made a change in December “FIX: Custom email subjects (x quoted you in [title], x replied to [title]) was removed, this broke email grouping. TBD, include info in footer somehow”

So given this, I would guess that we could have a single config for email subject (for the four normal types) which looked like this: “%{optional_re}[%{site_name}] %{topic_title}” and that could include category and username and perhaps other tokens if desired by the user, but would be the same format for all four and would not be translated.

Any thoughts?

There is a much deeper issue with missing List-ID and other list email headers that I think are far more significant and fundamental than title changes. Let’s deal with that before cosmetic changes to titles.

I plan on looking at this as well, particularly: List-Id, Precedence: bulk, Mailing-List, and perhaps Delivered-To, and I’ll do that in parallel.

But this seems orthogonal to how the subject line should be handled, hence I’d like some direction on that before writing more code to do what I think it should do, in particular the ability to add the “Re:”, but even ignoring that, the ability to customise the subject line seems highly desirable - its more a question of whether all four need different customisations, and how it interacts with the translation system if at all.

Basically, the sooner I can get Discourse behaving well as a mailing list, the sooner I can get my users moved over and get the forum benefits that Discourse offers (plus escape from YahooGroups!). So I’m keen to put the effort in to make it happen.

1 Like

For reference, the configurable subject line was discussed here:

And some of the other details regarding threading in mail clients like outlook being discussed here:

Thanks @mcwumbly! Clearly, my abilities to find things out about Discourse are utterly failing me.

I will leave this coding for @eviltrout for now and see if I can find any other issues to address, and hopefully as soon as this is sorted I’ll be able to get serious about migrating my users over from YahooGroups (which can’t happen soon enough!).

Search in discourse still needs more love.

I often find things only because I know they already exist from having read them before, and that still takes a fair bit of effort.

If you really want to search, try google “ your search terms” or use the search box on the 404 page (desktop only):

But don’t sweat it. Often you’ll discover similar topics by cross references made in a reply like those above.

OK this is now complete! See the email subject site setting and the associated howto.