We have moved to a new Sailfish OS Forum. Please start new discussions there.

patch email client

asked 2016-03-01 20:03:08 +0300

poddl gravatar image

updated 2016-03-05 13:01:58 +0300

does anybody know a way to modify or patch some system files, to have the email client showing emails like in the composing window? I really do not like the white background, while other apps shows it dark.

edit retag flag offensive close delete



that is because emails are shown as html. And also email client is closed source, so it will be really difficult to patch it

virgi26 ( 2016-03-01 20:28:43 +0300 )edit

ok. closed source might be a reason. But it seems that html can been display in the jolla default colors, like the app "jolla together" or the app "tidings"

poddl ( 2016-03-01 20:42:45 +0300 )edit

or anyone does know a way to change html view systemwide?

poddl ( 2016-03-01 20:49:02 +0300 )edit

The webview in general (SilicaWebView is apparently what they use here) can be made transparent with experimental.transparentBackground setting to true. Though I am not sure if the e-mail apps .qml files are stored somewhere easily editable (I guess they put it in the binary directly). In general its isn't a good idea to make it transparent for e-mails however as many mails especially html mails are optimized for a white background.

leszek ( 2016-03-01 23:08:31 +0300 )edit

Hmmm, I just looked arround the browser engine, it is a gecko engine, so if I create a file ~/.mozilla/mozembed/chrome/userContent.css I can customize the look of the browser....sadly the email client do not use this for the html view :-( I just tried this view for the browser...it does work well: link text

For the email client I will look further, even if the html mails are optimized for white background. With css, you could reoptimize it ;-)

poddl ( 2016-03-01 23:45:17 +0300 )edit

4 Answers

Sort by » oldest newest most voted

answered 2018-02-18 19:39:14 +0300

s_mario gravatar image

updated 2018-02-21 21:08:33 +0300

The Look from Plaintext E-Mails you could change in:

in Line 67 change Background from color: "white" to color: "transparent"
in Line 110 change Fontcolor from color: "black" to color: Theme.primaryColor
in Line 111 change Fontsize from Theme.fontSizeSmall : Theme.fontSizeExtraSmall to 
Theme.fontSizeMedium : Theme.fontSizeSmall

You could reoptimize the html-View with:


I tried it with the css-code from your linke above.

The color from the html-LoadingPage your could change in:

in Line 141 change color: "white" to color: "transparent"

Plain-Text Mail

Html Mail with Standard css-File

Html Mail with modified css-File

Html Mail with modified css-File and Pics


For HTML-Mails without Background change:

1st - (as from User jollailija described)

in Line 125 ? change value to "true" or add this line (how i had to do) 
experimental.transparentBackground: true

modify your htmlViewer.css for transparent background or take the attached file

htmlViewer.css-transparent-bg.zip Html Mail with modified css-File no Background

Html Mail with modified css-File no Background and Pics

edit flag offensive delete publish link more


I tried all this ages ago, none of it makes any difference. Clearly, you didn't actually try any of your own suggestions. Nice try, but no cigar.

Edz ( 2018-02-18 20:23:58 +0300 )edit

I don't know, what you have tried but for me it woks ;-). In Plaintext E-Mail i have now an transparent background. Html ist still html, but inverted. .. and sure i've tried my suggestions. Otherwise I wouldn't have posted it here. Sit down pls, six!

s_mario ( 2018-02-18 21:03:19 +0300 )edit

Fair enough, but it doesn't work for me on Jolla1, or I wouldn't have bothered responding the way I did. What do you mean by "sit down pls, six"? - I don't know this expression.

Okay, I have tried again, still no difference is made, very strange. By the way, there are plenty of others who post incorrect information here, including myself, so it is not uncommon to come across walk-throughs or suggestions that simply don't work, hence my response. But clearly this works for you, weird,

What changes were made to the htmlViewer.css ? - this I haven't done and is probably why none of it works for me.

Edz ( 2018-02-18 22:21:33 +0300 )edit

great, great! The Text view is now like it should be.

I tried to tweak the html view to look like the text view, but without success. But to get a dark theme is more then we had ever before!!

It's working here, sailfish X

poddl ( 2018-02-19 00:41:51 +0300 )edit

@Edz "Sit down pls, six!" - You can forget it. That's a saying in German. It's It's like you did gave the wrong answer to your teacher. And he says it afterwords ;-).

The css-File affects only the html-Mails. Did you restart the EMail App after the changing PlainTextViewer.qml? I did the changes also with an Jolla 1. Hmmm, for poddl it seems to work.

s_mario ( 2018-02-19 19:44:44 +0300 )edit

answered 2018-07-08 13:03:19 +0300

Edz gravatar image

updated 2018-07-11 15:46:28 +0300


For visibility [not an answer as such]

I have made a patch from this, but I am still testing it. Sometimes the patch applies and works as expected and other times patchmanager gives an error message and fails to apply the patch. If I unapply all patches and then apply the new patch, it then applies and works as expected....weird. Once I can get a smoother operation from using the patch, I will offer it up on Openrepos for those interested.

@s_mario - do I have your consent to offer the patch for public use, seeing as it is your idea/data..??, let me know please, thanks.

Meanwhile, I will get onto @coderus to see if he can shed more light on why the patch works sometimes and not other times.

edit flag offensive delete publish link more



I would be glad if someone could create a patch of it. At the moment I am still far from being able to create a patch and it's currently a lack of time :-(. And of course it is meant for public use. Thank you very much!

s_mario ( 2018-07-09 01:42:30 +0300 )edit

Thanks @s_mario - I like to ask rather than just steam ahead without a users consent/knowledge. For some reason, the data that is added to 'htmlViewer.css seems to throw a spanner in the works when it comes to applying the patch, but this may also be a problem with my device. I have 2 Jolla1 devices and I'm currently in the middle of making my second Jolla my main device, this is simply because I've realised that this new patch applies every time I use it on my second device. I'll keep you posted here.

Edz ( 2018-07-09 10:39:43 +0300 )edit

answered 2018-07-09 14:59:45 +0300

Edz gravatar image

updated 2018-07-11 15:48:56 +0300


̶̶̶F̶O̶R̶ ̶P̶U̶R̶P̶O̶S̶E̶S̶ ̶O̶F̶ ̶T̶E̶S̶T̶I̶N̶G̶ ̶A̶N̶D̶ ̶F̶E̶E̶D̶B̶A̶C̶K̶̶̶ ̶ ̶T̶h̶i̶s̶ ̶p̶a̶t̶c̶h̶ ̶i̶s̶ ̶a̶l̶s̶o̶ ̶o̶f̶f̶e̶r̶e̶d̶ ̶o̶n̶ ̶t̶a̶l̶k̶.̶m̶a̶e̶m̶o̶.̶o̶r̶g̶ ̶(̶h̶t̶t̶p̶:̶/̶/̶t̶a̶l̶k̶.̶m̶a̶e̶m̶o̶.̶o̶r̶g̶/̶s̶h̶o̶w̶t̶h̶r̶e̶a̶d̶.̶p̶h̶p̶?̶p̶=̶1̶5̶4̶6̶0̶8̶5̶#̶p̶o̶s̶t̶1̶5̶4̶6̶0̶8̶5̶)̶ ̶ ̶P̶l̶e̶a̶s̶e̶ ̶g̶i̶v̶e̶ ̶f̶e̶e̶d̶b̶a̶c̶k̶/̶s̶u̶g̶g̶e̶s̶t̶i̶o̶n̶s̶ ̶o̶n̶ ̶t̶h̶e̶ ̶t̶h̶r̶e̶a̶d̶ ̶a̶t̶ ̶t̶a̶l̶k̶.̶m̶a̶e̶m̶o̶.̶o̶r̶g̶ ̶(̶l̶i̶n̶k̶ ̶a̶b̶o̶v̶e̶)̶.̶ ̶ ̶̶̶P̶A̶T̶C̶H̶ ̶D̶O̶W̶N̶L̶O̶A̶D̶:̶ ̶T̶r̶a̶n̶s̶p̶a̶r̶e̶n̶t̶ ̶e̶m̶a̶i̶l̶ ̶b̶a̶c̶k̶g̶r̶o̶u̶n̶d̶;̶̶̶ ̶ ̶ ̶h̶t̶t̶p̶s̶:̶/̶/̶w̶w̶w̶.̶d̶r̶o̶p̶b̶o̶x̶.̶c̶o̶m̶/̶s̶/̶q̶c̶y̶i̶p̶s̶q̶b̶u̶s̶x̶o̶h̶i̶w̶/̶s̶a̶i̶l̶f̶i̶s̶h̶o̶s̶-̶p̶a̶t̶c̶h̶-̶t̶r̶a̶n̶s̶p̶a̶r̶e̶n̶t̶-̶e̶m̶a̶i̶l̶-̶b̶a̶c̶k̶g̶r̶o̶u̶n̶d̶-̶0̶.̶1̶-̶1̶.̶n̶o̶a̶r̶c̶h̶.̶r̶p̶m̶?̶d̶l̶=̶0̶ ̶ ̶̶̶C̶a̶u̶t̶i̶o̶n̶:̶ ̶D̶e̶s̶p̶i̶t̶e̶ ̶n̶o̶t̶ ̶f̶i̶n̶d̶i̶n̶g̶ ̶a̶n̶y̶ ̶s̶e̶r̶i̶o̶u̶s̶ ̶p̶r̶o̶b̶l̶e̶m̶s̶ ̶b̶y̶ ̶u̶s̶i̶n̶g̶ ̶t̶h̶i̶s̶ ̶p̶a̶t̶c̶h̶,̶ ̶y̶o̶u̶ ̶u̶s̶e̶ ̶t̶h̶i̶s̶ ̶f̶i̶l̶e̶ ̶p̶u̶r̶e̶l̶y̶ ̶a̶t̶ ̶y̶o̶u̶r̶ ̶o̶w̶n̶ ̶r̶i̶s̶k̶̶̶ ̶ ̶E̶D̶I̶T̶:̶ ̶1̶0̶/̶0̶7̶/̶2̶0̶1̶8̶;̶ ̶ ̶̶̶P̶A̶T̶C̶H̶ ̶D̶O̶W̶N̶L̶O̶A̶D̶ ̶V̶E̶R̶S̶I̶O̶N̶ ̶T̶W̶O̶:̶ ̶T̶r̶a̶n̶s̶p̶a̶r̶e̶n̶t̶ ̶e̶m̶a̶i̶l̶ ̶b̶a̶c̶k̶g̶r̶o̶u̶n̶d̶;̶̶̶ ̶ ̶h̶t̶t̶p̶s̶:̶/̶/̶w̶w̶w̶.̶d̶r̶o̶p̶b̶o̶x̶.̶c̶o̶m̶/̶s̶/̶d̶6̶6̶q̶7̶k̶o̶j̶n̶c̶a̶h̶m̶j̶o̶/̶s̶a̶i̶l̶f̶i̶s̶h̶o̶s̶-̶p̶a̶t̶c̶h̶-̶t̶r̶a̶n̶s̶p̶a̶r̶e̶n̶t̶-̶e̶m̶a̶i̶l̶-̶b̶a̶c̶k̶g̶r̶o̶u̶n̶d̶-̶0̶.̶1̶-̶2̶.̶n̶o̶a̶r̶c̶h̶.̶r̶p̶m̶?̶d̶l̶=̶0̶

edit flag offensive delete publish link more



Great work. Thank you very much. Finally I can read my emails on the Xperia X. For me there is just one thing missing: the possibility to copy and paste. That would be a great feature for the Email app.

dirksche ( 2018-07-11 14:30:15 +0300 )edit

@dirksche - thanks for the feedback. Regarding 'copy and paste' I wouldn't have the first idea on implementing that into jolla-email, sounds like a separate feature request should be made for such a thing.

Edz ( 2018-07-11 14:52:01 +0300 )edit

Hi Edz, did you delete your Apps and Patches on Openrepos or is there a Probblem with Openrepos?

s_mario ( 2019-01-03 18:19:10 +0300 )edit

answered 2016-03-05 12:56:21 +0300

updated 2016-03-05 13:00:42 +0300

Wat is happening over here? Lemme get some things straight:

  1. Being closed source isn't usually a problem when talking about QML files (they can be read/wrote by user). For example Jolla's homescreen is also closed source, but there are a ton of patches available for it. In this case the QML files aren't as easily accessible as with some other apps, but I'll cover that at 4.

  2. Jolla Together and Tidings don't display HTML, they use things called APIs (application programming interfaces) or RSS feeds and such (Tidings) to get the data. HTML is not involved here.

  3. The email app doesn't use the gecko browser engine. Instead it uses SilicaWebView which is actually a modified WebView from Qt Quick.

  4. The email app's QML files are stored in the binary at /usr/bin/jolla-email so we can't edit those. However, we can edit the SilicaWebView systemwide by editing the SilicaWebView.qml file at /usr/lib/qt5/qml/Sailfish/Silica/
    You can have a look at the file here: https://github.com/dm8tbr/sailfishsilica-qt5/blob/master/usr/lib/qt5/qml/Sailfish/Silica/SilicaWebView.qml

edit flag offensive delete publish link more


Thank you! I did change, but no success :-( After changing I did a systemctl --user restart lipstick After some changes the email app does not start, some are ok. but got the background not dark or transparent

poddl ( 2016-03-05 15:22:54 +0300 )edit

you can't do anything if the email app in its qmls overwrites your settings in SiliciaWebView

leszek ( 2016-03-05 16:25:43 +0300 )edit

:-/ bullshit email app; plain text mail are not zoomable (unreadable); urls in plain text got theme font color, but on white background...also not readable. Just totally unusable and my main app is email and mostly got plain text :-(

poddl ( 2016-03-05 17:23:33 +0300 )edit
Login/Signup to Answer

Question tools



Asked: 2016-03-01 20:03:08 +0300

Seen: 2,344 times

Last updated: Jul 11 '18