Kmail header theme to show Message-ID

Hello,
In order to organize, cross-link, etc my emails in an external system (which is used to organize all of my digital objects) I found that it is the best if I use the Message-ID property to refer to emails. This seems to be the only way to quickly, uniquely identify emails via several email clients.
Since I am doing this often, it would be nice if Message-ID could be shown in the header. I started customizing a header theme but I find no documentation how to obtain Message-ID. I tried header.messageid, header.MessageID etc but they do not display anything. Any help would be appreciated. Thank you.

Unfortunately this is not possible, but I just created a small merge request to add the functionality

Thank you very much, I hope it gets soon into the official releases.
Daniel

Hi,

if you are using the Header Theme Editor, it’s possible already - you have to add “message-id” to the “Extract headers” list in the “Desktop File” tab, then in the editor you can use

{{ header.messageid }}

You can’t use |safe, since usually the message-id is in form <foo>, so it needs to be HTML-escaped by the formatter engine, otherwise it gets interpreted as an HTML tag.

If you are doing it manually, you can do it as well, you just need to add

DisplayExtraVariables=message-id

into the theme’s .desktop file and then you can use {{ header.messageid }} in the template.