Claws Mail
Claws Mail¶
Clawsmail is a lightweight mail client for Linux and other operating systems. It is highly configurable, though it is missing some features by default - eg you cannot compose HTML emails and you need plugins to view HTML emails. However, its folder management and connectivity options are very good, and most of the quirks can be worked around.
Getting datestamps on printed emails¶
For html mails, if you have one of the html rendering plugins, you will find that you can't get it to print the header information, eg date, from, to, subject etc. This fix I found in a mailing list from 2016, and reproduce here with the kind permission of the original author Wolfgang Rosner.
Original link: https://claws-mail.org/pipermail/users/2016-October/017644.html
After some futile research in other directions, I decided to do so.
It's still a crude hack in early pre-alpha state.
Nevertheless, I just made some quick tests with different mail formats and it works surprisingly well.
It even loads missing images from the web. No clue how to configure it not to do so.
There is still some code page issue for correct display of German "Umlaut" (and maybe other special
characters, I'd expect).
You need "wkhtmltopdf" as html-to-pdf-converter and "okular" as pdf viewer. Config does not yet work here,
change pipe command in line 112 to switch to a different viewer, instead.
You need perl including Email::MIME and Data::Dumper modules.
I've installed everything from the current debian jessie repo's. No idea about version dependencies.
The script reads a message from STDIN in the format claws mail produces in its "Action" interface.
Therefore, an action command has to be created in claws mail something like this:
cat %p | /home/user/path/htmailread.pl
(fit the path of the executable to your environment)
To change the appearance of the header, try to tweak the HTML-generation of the header lines in code
lines 72 ... 83.
To change visible header items or their sequence, change line 21.
In the configuration / actions interface, simply add a new action containing the command above. This will
then appear as a menu item in the message view screen under tools / actions. I installed it on kubuntu 24.04
with standard repos - I had to install a couple of perl modules and other tools via APT - eg wkhtmltopdf,
libemail-mime-perl, libhtml-escape-perl.
For it to work, you need to select the non-html view and then click tools/actions, otherwise for some reason it can't pull out the required headers. It still renders the html version (regardless of whether you have the fancy plugin installed).