[Users] How to print Headers on HTML mails ?

Wolfgang Rosner wrosner at tirnet.de
Tue Oct 11 01:35:14 CEST 2016


Am Sat, 8 Oct 2016 08:59:58 +0200
schrieb Wolfgang Rosner <wrosner at tirnet.de>:

> Or do I have to write a Perl script?

After some futile research in other directions, I decided to do so.
Attached you will find what I have done.


It's still a crude hack in early pre-alpha state.

Nevertheless, I just made some quick tests with differnt 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 differnt 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 appearence 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.

If you don't understand the advices here, try to learn PERL or find
somebody capable of it.

Have fun testing.
I'm glad to learn about your improvements :-)




-- 
Wolfgang Rosner


-------------- next part --------------
A non-text attachment was scrubbed...
Name: htmailread.pl
Type: application/x-perl
Size: 2651 bytes
Desc: not available
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20161011/49e060f0/attachment.bin>


More information about the Users mailing list