This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KMail's external script for message viewer

Tags: None
(comma "," separated)
askembris
Registered Member
Posts
28
Karma
0
OS
Hi all,

I recently returned to KMail as I have had it with Thunderbird's quirks and extension hell.

I have set up to prefer plain text to HTML in the appropriate configuration option. In some cases, it seems some HTML entities are displayed along with the plain text. An example would be: "It is due at the end of May 15th". There are normal spaces displayed, but a " " entity has gone through. Obviously, if I switch to view the message as HTML, this is displayed fine.

Viewing the source of the message shows that the original message is base64-encoded and decoding the text/plain part shows that the " " entity is actually included in the original message, so KMail displays it correctly - it is a bug of the originator's e-mail client (I think it does not clean up text that has been pasted but not typed in the editor window)

However, I would like to clean up the message for viewing, as in many cases it is unreadable due to these characters. I would rather not switch to HTML view for this, because I use a dark theme and if the text color is hard-coded then everything becomes unreadable.

KMail has a plugin for the message viewer - it's called the "External Script", which says "This plugin allows you to use an external script against the message viewer.". It seems to me that if I could pipe the message through something like "recode -f html" my problems would be solved.

However, I haven't managed to make it work. To configure the script, you need to define the "command line" and the "executable". I have tried some combinations but they don't seem to work. I am not sure if the message is automatically piped to the script or if I need to include a variable etc. Unfortunately, there seems to be no documentation available for this feature.

Has anyone used this feature or can guess how it works? If I had some example of how to use it, I could figure out a solution to this and clean up these badly formed messages.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]