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

Emails body is breaking #4430

Closed
adam3278 opened this issue Dec 18, 2024 · 3 comments
Closed

Emails body is breaking #4430

adam3278 opened this issue Dec 18, 2024 · 3 comments

Comments

@adam3278
Copy link

adam3278 commented Dec 18, 2024

Hi,
I'm facing very weird issue. Freescout breaks some elements of incoming emails bodies. There is no issue in email itself, because I can open perfectly with roundcube or outlook. How to fix this? I can make some changes via modules, but what needs to be changed?

HTML elements breaking:

<div style="margin-bottom:3.75pt;"><h2 style="margin-right:0cm;margin-bottom:3.75pt;margin-left:0cm;"><span style="font-size:13.5pt;font-family:Helvetica, 'sans-serif';color:#006AB6;">Szczegóły rozliczenia</span></h2><p style="margin-right:0cm;margin-bottom:3.75pt;margin-left:0cm;"><span style="font-size:11.5pt;font-family:Helvetica, 'sans-serif';color:#494949;">Forma rozliczenia: <b>Faktura</b></span></p><p style="margin-right:0cm;margin-bottom:3.75pt;margin-left:0cm;"><span style="font-size:11.5pt;font-family:Helvetica, 'sans-serif';color:#494949;">Dane do przelewu:</span></p><div style="border:solid #E5E5E5 1pt;padding:9pt 9pt 9pt 9pt;background-color:#FFFFFF;"><span style="font-size:11.5pt;font-family:Helvetica, 'sans-serif';color:#8F8F8F;">Nazwa: <b>*****</b><br>Numer rachunku: <b>*****</b> (mBank S.A.)<br>Adres: <b>*****</b><br>Tytuł przelewu: <b>Zamowienie nr ***</b> </span></div><p style="margin-right:0cm;margin-bottom:18.75pt;margin-left:0cm;"><strong><span style="font-size:11.5pt;font-family:Helvetica, 'sans-serif';color:#494949;">WAŻNE: Jeżeli chcesz otrzymać dokument faktura pro–forma, poinformuj nas o tym fakcie odpowiadając na tą wiadomość e–mail.</span></strong></p></div>

before

is changed to this:

<div style="margin:0 0 5px 0;">
            <h2 style="display:block;margin:0 0 18px;text-align:left;font-size:18px;font-weight:700;color:#006ab6;margin-bottom:5px;font-family:'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;">Szczegóły rozliczenia</h2>
            <p style="margin:0 0 16px;margin-bottom:5px;">Forma rozliczenia: <b>Faktura</b></p>
            <p style="margin:0 0 16px;margin-bottom:5px;">Dane do przelewu:</p>
            
            Nazwa: <b>*****</b><br>
Numer rachunku: <b>*****</b> (mBank S.A.)<br>
Adres: <b>*****</b><br>
            Tytuł przelewu: <b>Zamowienie nr ***</b>
            
            <p style="margin:0 0 16px;margin-bottom:25px;"><strong>WAŻNE: Jeżeli chcesz otrzymać dokument faktura pro–forma, poinformuj nas o tym fakcie odpowiadając na tą wiadomość e–mail.</strong></p>        </div>

after

The same behavior applies to other elements and their styles like color. The most funny is the situation, when the customer replies to the message, and it's attached in mailing history (reply to) completely untouched. Thanks in advance for help

@adam3278
Copy link
Author

Ok, but what are the conditions for the formatting filter? I can edit the described email template in woocommerce, but I need to know what to omit.

@freescout-help
Copy link
Collaborator

You can analyze HTML purifier settings: https://github.com/freescout-help-desk/freescout/blob/dist/config/purifier.php

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

No branches or pull requests

2 participants