Closed Vitineth closed 3 years ago
Any HTML messages received currently
So it worked before? What changed? The HTML output is fishy. So, a sample will be needed. You could also enable imap_debug and verify that valid HTML is returned by the IMAP server.
Sorry I realise my phrasing was a bit misleading, I haven't had working support for HTML messages at all so far. This is how it has been acting since the install. To make it easier I've made the most simple email possible to show its not rendering.
Roundcube Render
Rainloop Render
Roundcube HTML
Email Content (copied from the eml file exported via roundcube)
--_000_AS8PR06MB7351FB619E715420CAA0E3D9C87C9AS8PR06MB7351eurp_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
This is a test email containing bold and italics to ensure that it is sent =
as HTML and not plain text
--_000_AS8PR06MB7351FB619E715420CAA0E3D9C87C9AS8PR06MB7351eurp_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<style type=3D"text/css" style=3D"display:none;"> P {margin-top:0;margin-bo=
ttom:0;} </style>
</head>
<body dir=3D"ltr">
<div style=3D"font-family: Calibri, Arial, Helvetica, sans-serif; font-size=
: 12pt; color: rgb(0, 0, 0);">
This is a test email containing <b>bold</b> and <i>italics</i> to=
ensure that it is sent as HTML and not plain text</div>
</body>
</html>
--_000_AS8PR06MB7351FB619E715420CAA0E3D9C87C9AS8PR06MB7351eurp_--
(I can provide the complete .eml file if you would like)
I realise that this is likely an issue with my configuration but I am at a bit of a loss of what to change so apologies if this ends up being something obvious and completely my fault! I will enable imap_debug
shortly and verify that it is receiving it correctly but I thought this would be a start.
I have no clue. <!-- html ignored (?) -->
is strange, Roundcube does not generate such code (I mean I don't see how that (?)
is produced). Are there any errors in log? Does vendor/masterminds/html5
folder exist?
Could you add rcube::console($html);
before and after this line https://github.com/roundcube/roundcubemail/blob/18b980cfb1d89ff0360272803ed93559b5f0f61f/program/steps/mail/func.inc#L906 ? This will log input and output from the HTML sanitizer. It's logged to logs/console.log
. I'd like to see this log.
The errors.log
file is empty currently and the old error file contains unrelated issues (a misconfigured plugin which is now resolved). The vendor/masterminds/html5
folder does exist and contains the following files:
$ la vendor/masterminds/html5
CREDITS LICENSE.txt README.md RELEASE.md UPGRADING.md bin composer.json example.php phpunit.xml.dist sami.php src
When the line is added to that file and the example email previously mentioned is opened, consosle.log
contains the following
[12-Apr-2021 16:58:41 +0000]: <etr6d8s0> <!-- html ignored (?) --><!-- html ignored (?) --><!-- head ignored (?) --><!-- html ignored (?) --><!-- meta ignored (?) -->
<!-- html ignored (?) --><style type="text/css">P {margin-top:0;margin-bottom:0;}
This is a test email containing bold and italics to ensure that it is sent as HTML and not plain text
</style>
This is the entire contents of the file. Thanks for looking into this, I really appreciate the assistance.
Please, add rcube::console() after and BEFORE the "wash line".
I'm really sorry, I completely missed, that. Here is the console log with both logging messages:
[13-Apr-2021 12:28:47 +0000]: <u07vi33v> <html>
<head><meta charset="UTF-8" />
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
This is a test email containing <b>bold</b> and <i>italics</i> to ensure that it is sent as HTML and not plain text</div>
</body>
</html>
[13-Apr-2021 12:28:48 +0000]: <u07vi33v> <!-- html ignored (?) --><!-- html ignored (?) --><!-- head ignored (?) --><!-- html ignored (?) --><!-- meta ignored (?) -->
<!-- html ignored (?) --><style type="text/css">P {margin-top:0;margin-bottom:0;}
This is a test email containing bold and italics to ensure that it is sent as HTML and not plain text
</style>
This is strange it two ways
<!-- html ignored (?) -->
is used multiple times in the output(?)
part, what am I missing?).What PHP version? Are you using opcache? Try without it.
You could also add rcube::console($html);
before https://github.com/roundcube/roundcubemail/blob/18b980cfb1d89ff0360272803ed93559b5f0f61f/program/lib/Roundcube/rcube_washtml.php#L954
No feedback. No way to reproduce.
Any HTML messages received currently do not display any output. Plain text versions of the emails are displayed correctly and the emails render correctly in rainloop (to try and make sure the email content wasn't completely invalid). This issue is shared by all HTML emails.
When opening the body in developer tools it shows this output in the iframe (however I'm not sure if I'm looking in the right place):
This is accessing an external IMAP server for mail if that makes a difference.
Server Information
Served via Apache2:
Using PHP version 7.4 with the following extensions
The page is served behind a HAproxy reverse proxy server. The mail server is hosted via cpanel (I can get more information on it if needed). The page was accessed using Vivaldi 3.3.2022.45 (Stable channel) (64-bit) on Windows 10 OS Version 2009 (Build 19043.899) and the problem does continue to exist with all plugins disabled on Roundcubemail 1.4.11. I can attach the email if required but it is a standard mailchimp advertising email and the problem is shared by ever email I have received.