In KMail all themes are hard-coded, so it’s not possible for end user to customize his mail header theme.
It’s right in KMail we have several themes:
- fancy Headers

  • enterprise Headers
  • Brief Headers
  • Standard Headers
  • Long Headers
  • All Headers
  • Custom Header (in 4.11 see previous blog)

But to improve it we need to help user to create them.

So I studied Grantlee.
Grantlee is an HTML generator. So it was ok for header theme.

Grantlee generates HTML from an initial HTML template + some keywords defined by developer.
So now just an HTML developer can customize it, it’s not necessary to rebuild KMail.

And I used knewstuff library to allow to upload/download new themes as you can see in next screenshot:

Ok I am not a artist, I can’t show you a new theme, but you can see that I can recreate fancy theme with Grantlee.


<div dir=”ltr”>
<div dir=”ltr”> {{ header.subject|safe }}
<td width=”100%”>


<th align=”left” style=”font-size: 10px;”>{{ header.fromi18n }}</th>
<td style=”font-size: 10px;”>{{ header.from|safe }}

{% if header.resentfrom %}
&nbsp; {{ header.resentfromi18n }}: {{ header.resentfrom|safe }}
{% endif %}

{% if vCardName %}
&nbsp;&nbsp;<a href=”{{ header.vcardname|safe }}”>{{ header.vcardi18n }}</a>
{% endif %}

…….. (see all theme code in messageviewer/theme/example_fancy/header.html)

We have a desktop file which define theme name but also the extra headers to displaying.

In example I add “Sender” which is not default header.

I hope that it will have more header theme create (I created a application for generate them, I will blog about it soon)


2 comments untill now

  1. Nice feature! I imagine that especially business users will use this to add some corporate design to the headers e.g. for printing emails out (if they actually are printed).
    I assume there is also a GUI to manage (edit/delete) the self-created themes, right?

  2. Yes there is an editor for it. Will blog about it soon.

Add your comment now