How to correctly style an email signature in Kmail?

I’m trying to correctly set up an HTML signature in Kmail, with little success.

This is what I want to achieve

https://codepen.io/anon/pen/xyZwWb

Basically an image on the left, some text lines on its right, and above all three styled rulers; nothing really fancy.

Anyway, it isn’t working. When I insert this HTML into Kmail as a signature, the result is that the hr’s are not styled, nor the image: the rulers are all grey and spaced with margin, the image isn’t floating and the whole layout is a mess.

Am I doing something wrong? This is working in other clients, like in example evolution.

Do not insert the html code, but use the html editor in the identity signature dialogue

Thank you for your reply.

This is exactly what I tried to do, but I am not getting the expected result.

What happens if you paste the html code directly in ~/.config/emailidentities, after the “Inline Signature=” for the account? You may need a logout/login.

I’ve tried to do what you suggested, but the result is always the same, the output is messed up and the proper styling isn’t applied.

Try adding


</body></html>

at the end of the sig line in emailidentities. Mine has that …

OK, did some testing. If I copy the code from your sig, then go to an identity in kmail, open the sig dialog, pick Insert HTML paste the code there, click OK, I see what the preview in your link shows, i.e. completely correct sig.

Then there is some problem on my part.

Here is what I get: https://imgur.com/a/YZudY3F

Just to be precise, I’m using Kmail version 18.08.1-1.1 on Tumbleweed.

That’s what it’s for. But it misses the body / html closure tags

Even by adding the closing tags, the result is the same.

By pasting the full fledged code and applying it, the preview window shows me what I posted previously, and by selecting all and opening again the “insert HTML” dialog, this is what I get:

https://imgur.com/a/jIc5LZe

As you can see, the whole code is modified and stripped of proper styling. I don’t know if some sort of compatibility settings in my copy of kmail prevent this to work correctly, I tried to explore thoroughly all the configuration windows, but I can’t figure this out.

Is HTML mail enabled for this account ?

HTML is enabled globally, under “Settings > Securuty > Reading” (or something similar, I’m using the italian version).

i’ve even tried to create a new linux user account to test this in a clean environment, and the problem is still present even in that scenario.

Still having this issue, I’m reporting here my tests.

I’ve tried to correctly set the signature using Kmail with different distros (non only openSUSE but also, i.e. on clean Manjaro and Kubuntu installs), and the problem occurs everytime.

I think I can safely rule out:

  • problems with a specific distro
  • my current system setup (at least, the default setup from other distros has the same behaviour).

I’ve tried to ask support in KDE forums, but with no success: https://forum.kde.org/viewtopic.php?f=215&t=156366

Create a new user, login as that user and see if the issue exists for that user. That would mean it’s not somewhere in your configs.

That’s something that I’ve already tried to do, without any success :frowning: