Mautic Community Forums

HTML E-Mails are modified by Mautic / Mail Module not usable

Mautic
My Mautic version is: v2.16.1 and 3.0 Beta
My PHP version is: 7.2.29

Your problem
Creating HTML E-Mails in an external Editor. Copy/paste it in a “code-mode” HTML e-mail. Close “builder” and “apply” the e-mail. Reopening the e-mail in the HTML Builder shows it removed some opening <span …> and <div …> tags and autocloses some opening <a …> or <span …> tags (<a …> -> <a … />)

Two Problems so far:

  1. removes opening <span …> and <div …> tags while leaving the closinig span tags
    => span tags not usable
  2. changes <a …> tags to <a … /> tags or <span … > to <span … />
    => a tags not usable

Both problems occur by chance in the HTML code, but every time at the same locations

These errors are showing in the log:
none

Steps I have tried to fix the problem:
tried to create a e-mail template and use this without modifying. Same problem: the sent e-mail has the problems mentioned above.

I changed all span tags to div tags and vice versa. Same problem.

You can get the source html-e-mail here: http://cloud.rene-jaeger.de/index.php/s/k9btLgY6fkj4mbn
You can get the modfied html-e-mail here: http://cloud.rene-jaeger.de/index.php/s/18nxrHSeJYGcqYw

You can copy/paste the modified version in here, then you get a fast overview what’s missing: https://validator.w3.org/#validate_by_input

We tried it on two v2.16.1 and one 3.0 Beta, it’s everywhere the same problem.

I think it is easy to reproduce the errors, just copy/paste the source e-mail to a new Mautic HTML code-mode “template” => exit builder => apply => open Builder again or sent test e-mail and grab html code.

How can we disable the “code-changing” module of Matic?

Thanks for any help.

1 Like

Update:
Mautic kills a complete

<img src=“data:image/png;base64,iVBORw…” alt=“Logo Atlantis Networks” title=“Logo Atlantis Networks”

tag!

This e-mail processor is horrible!

Please correct this e-mail module as soon as possible.

1 Like

Upgrade to 3.1.2 or 2.16.3

I’ve not had issues with the Mail Builder in Mautic yet. I’ve recently upgraded to 3.1.2 and it actually runs with less issues than the 2.15 I used before.

I notice some months passed without any response to your topic. Have you managed to solve this issue?

Hi codes9,
I designed the E-Mails with a html-Editor (blue griffon) and copied the code into the Mautic Mailbuilder as html code. The Mailbuilder then produced the errors as described above. I still use Version 2.16. I did not switch to Version 3 until now, because I get it all run with work-arounds. The issues so far are not solved though. I will switch to Version 3 in the next month and then we will see…

@atlantis

I’ll give some custom html emails a go shortly in 3.1.2 and let you know how it goes and if all my email tags survive.

Thank you very much. It will be helpful for me.

You can get my source html-e-mail here: http://cloud.rene-jaeger.de/index.php/s/k9btLgY6fkj4mbn
Perhapy you can try it with this one, too.

@atlantis

I’ve tested on my 3.1.2 install.

After adding your code into a code mode email the following minor changes happen:

1.Addition of Doctype entries

<!DOCTYPE html><!DOCTYPE html><!DOCTYPE html>
Mautic adds 2 more Doctype entries. I deleted all 3 and clicked apply then re-added only one entry. I get a minimal of two such entries unless I delete <!DOCTYPE html> entirely. This is probably something we can report as a bug on Github.

2. &nbsp; dropped in line 90

Several Non Breaking spaces are dropped from line 90.

Other than this the email is unaltered and actually looks quite good in the browser:

Looks like 3.1.2 handles your email a bit better than 2.1.6. I think it would be worth upgrading to 3.1.2 if you’re going to create a lot of html based email.

Hello codes9,
ok looks very good. Thank you for your efforts!
I will update it in a few weeks when I have time 4 that. I will report if mautic e-mail processor will work fine for me.
Much success 4 your business!

It’s my pleasure. I’m looking forward to hearing how your upgrade has gone. Drop me a PM when you’ve upgraded.

1 Like