Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering issue #564

Closed
relikd opened this issue Oct 19, 2022 · 8 comments
Closed

Rendering issue #564

relikd opened this issue Oct 19, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@relikd
Copy link

relikd commented Oct 19, 2022

Describe the bug
SnappyMail can not display an email properly which works fine in Rainloop. External images are disabled for both plugins. It seems SnappyMail does two things differently:

  • First, it does not hide the to-be-loaded images and instead shows the long links.
  • Second, SnappyMail does not seem to load or apply the stylesheet. A quick search through the email source does not reveal any external sources for the style, must be all inline or defined in head.

If needed I can provide the email source.

Screenshots
With Rainloop:
1

With SnappyMail:
2

Please complete the following information:

  • Browser: Firefox 105
  • SnappyMail Version: 2.19.1
@the-djmaze
Copy link
Owner

Correct. SnappyMail shows info about the hidden images on purpose, where RainLoop does not.
The reason behind this has several reasons:

  • give users an indication where the hidden images are
  • give users information about the hidden images (filename, possible tracking url, etc.)

The "long links" you refer to indicate that they are tracking images and that you should avoid clicking "Bilder anzeigen".
Else the text should be much shorter.

However, maybe i can add a max-width with ellipsis to it.

Secondly, SnappyMail indeed removes all <style>sheets.
The problem is that they may conflict with the whole application because the mail is not rendered in an iframe.
RainLoop does the same thing.

@the-djmaze
Copy link
Owner

P.S. If you want the click tracking removed from those emails, then provide the .eml source and i will look what is possible.

Currently a view are stripped/decoded as you can see at:
https://github.com/the-djmaze/snappymail/blob/master/dev/Common/Html.js#L25

@relikd
Copy link
Author

relikd commented Oct 19, 2022

There is no tracking to be removed, sadly. This email is from a typical newsletter provider (in this case send-in-blue). Nowadays these providers replace all links with tracking links so that the newsletter transmitter gets their statistics. You can't even disable this tracking "feature" (tried that for my newsletter provider ...).

But I must disagree on the stylesheet issue. Rainloop must do something differently because the email is displayed properly there. You can see the missing padding and blue font in the button for SnappyMail whereas Rainloop looks fine. What is more likely, that disabling styles will break the email format or that enabling styles will break the UI? And how could we circumvent this problem then? Could we add an iframe for the Email preview? Or have very unique css classes for snappy? I wonder how Rainloop has solved this problem.

@the-djmaze
Copy link
Owner

SnappyMail removes a lot because of the "dark mode" it has.
There's even a user setting to remove all text and background colors!

In the past there were several view issues with e-mails and some were mine to solve and others by the sender.
Mostly because the sender wrote invalid HTML/CSS that screwed up big time.

If you provide the email source i can have a look why yours is failing.

@relikd
Copy link
Author

relikd commented Oct 19, 2022

email.eml.txt

@the-djmaze
Copy link
Owner

Found 2 to solve.

The HTML source does have issues though.
I found <a><p> which is not valid HTML.

@the-djmaze the-djmaze added the enhancement New feature or request label Oct 20, 2022
the-djmaze pushed a commit that referenced this issue Oct 20, 2022
@the-djmaze
Copy link
Owner

Also added stripping of SendInBlue image tracking

@relikd
Copy link
Author

relikd commented Oct 21, 2022

Regarding <a><p>, it may feel weird but is actually fine with the standard (using HTML5 or "HTML 4.01 + RDFa 1.1" as Doctype)
https://validator.w3.org/#validate-by-input

<!DOCTYPE html>
<html lang="en">
<head><title>#</title></head>
<a href="#"><p>Lorem Ipsum</p></a>
</html>

And if you argue that a strict HTML 4.01 is required for older browsers, then I'd argue that SnappyMail does not support old browsers (I get a browser-update warning on my 6y old smartphone).

...

With 2.19.2 it looks better but is still cluttered. If I had an option, I would disable the display-hidden-images altogether.

screen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants