View Issue Details

IDProjectCategoryView StatusLast Update
0004714SOGoWeb Mailpublic2019-05-23 13:14
ReporterRafael Setragni Assigned To 
PriorityhighSeverityminorReproducibilityalways
Status newResolutionopen 
Platform[Server] LinuxOSDebianOS Version8 (Jessie)
Summary0004714: All HTML e-mails are beeing displayed in wrong way
Description

Every HTML e-mail who is displayed inside the "SOGoHTMLMail-CSS-Delimiter mailer_htmlcontent" elements has its styles corrupted. But it only can be noticed on more complex HTML codes.

That happens because of the strategy addopted to avoid the Sogo's css stylesheet beeing applyed over the message's stylesheet.

To do that, the Sogo's algorithm loads all the message stylesheet files content, declared inside the HTML head and body element, and rewrite then in a single <style> tag after the class "SOGoHTMLMail-CSS-Delimiter mailer_htmlcontent", including the class "SOGoHTMLMail-CSS-Delimiter" on each one.

While sogo does that, it also rewrite every single class attribute with the "!important" tag.

But the "!important" tag does not only overwrite the past style declaration, it changes the whole next stylesheet hierachy. It means that simple HTML mails will be displayed correctely and the problem will not be noticed. But the complex ones, who has more than one stylesheet declared and anothe styles declared insite the html elements, will be corrupted.

Steps To Reproduce

To reproduce the error, just use any advanced marketing mail tool on web, as https://beefree.io who has stylesheets aplyed on head tag and over the elements, and open it in Sogo mailbox. The whole e-mail will be displayed different from what it was designed for.

But do not reply the message from another mail service, as Gmail, because they will rewrite the stylesheet and the problem will not occur.

Additional Information

To fix the error is simple. Just remove the "!important" tag insertion from the stylesheet rewrite process and aply the "cleanslate" stylesheet class bellow the first "SOGoHTMLMail-CSS-Delimiter mailer_htmlcontent" div element.

The cleanslate class is an open source project who resets all the stylesheet declaration to his default vales. It can be found on website http://cleanslatecss.com/

I did it using the browser's inspector tool and it fixed the problem. I just cannot do it definetly changing the Sogo´s files because my files are minimized. I will not be so productive as you guys doing that on original ones.

I´m also attaching a e-mail example, builded using https://beefree.io

TagsNo tags attached.

Activities

Rafael Setragni

Rafael Setragni

2019-03-27 15:51

reporter  

Rafael Setragni

Rafael Setragni

2019-03-27 18:07

reporter  

1172471.eml (73,887 bytes)
francis

francis

2019-05-16 16:02

administrator   ~0013573

It doesn't work for me. cleanslate overwrites inline rules that are not marked as !important.

Issue History

Date Modified Username Field Change
2019-03-27 15:51 Rafael Setragni New Issue
2019-03-27 15:51 Rafael Setragni File Added: beefree-yuh0ob60aij.zip
2019-03-27 18:07 Rafael Setragni File Added: 1172471.eml
2019-05-16 16:02 francis Note Added: 0013573
2019-05-23 13:14 ludovic Severity major => minor