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

**URL:** https://forum.mautic.org/t/html-e-mails-are-modified-by-mautic-mail-module-not-usable/13852
**Category:** Product Support
**Tags:** community
**Created:** [April 10, 2020, 2:10pm UTC](https://forum.mautic.org/t/html-e-mails-are-modified-by-mautic-mail-module-not-usable/13852 "2020-04-10T14:10:55Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![atlantis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/atlantis/32/452_2.png) [@atlantis](https://forum.mautic.org/u/atlantis)
#### Post date: [April 10, 2020, 2:10pm UTC](https://forum.mautic.org/t/html-e-mails-are-modified-by-mautic-mail-module-not-usable/13852/1 "2020-04-10T14:10:55Z")

</div>

**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](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](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](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.

---

<div class="post-metadata">

### Author: ![atlantis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/atlantis/32/452_2.png) [@atlantis](https://forum.mautic.org/u/atlantis)
#### Post date: [April 11, 2020, 8:55pm UTC](https://forum.mautic.org/t/html-e-mails-are-modified-by-mautic-mail-module-not-usable/13852/2 "2020-04-11T20:55:46Z")

</div>

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.**

---

<div class="post-metadata">

### Author: ![codes9](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/codes9/32/682_2.png) [@codes9](https://forum.mautic.org/u/codes9)
#### Post date: [November 9, 2020, 5:08pm UTC](https://forum.mautic.org/t/html-e-mails-are-modified-by-mautic-mail-module-not-usable/13852/3 "2020-11-09T17:08:32Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![atlantis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/atlantis/32/452_2.png) [@atlantis](https://forum.mautic.org/u/atlantis)
#### Post date: [November 9, 2020, 8:51pm UTC](https://forum.mautic.org/t/html-e-mails-are-modified-by-mautic-mail-module-not-usable/13852/4 "2020-11-09T20:51:37Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![codes9](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/codes9/32/682_2.png) [@codes9](https://forum.mautic.org/u/codes9)
#### Post date: [November 11, 2020, 9:43pm UTC](https://forum.mautic.org/t/html-e-mails-are-modified-by-mautic-mail-module-not-usable/13852/5 "2020-11-11T21:43:36Z")

</div>

@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.

---

<div class="post-metadata">

### Author: ![atlantis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/atlantis/32/452_2.png) [@atlantis](https://forum.mautic.org/u/atlantis)
#### Post date: [November 12, 2020, 7:51am UTC](https://forum.mautic.org/t/html-e-mails-are-modified-by-mautic-mail-module-not-usable/13852/6 "2020-11-12T07:51:32Z")

</div>

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](http://cloud.rene-jaeger.de/index.php/s/k9btLgY6fkj4mbn)  
Perhapy you can try it with this one, too.

---

<div class="post-metadata">

### Author: ![codes9](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/codes9/32/682_2.png) [@codes9](https://forum.mautic.org/u/codes9)
#### Post date: [November 16, 2020, 7:52am UTC](https://forum.mautic.org/t/html-e-mails-are-modified-by-mautic-mail-module-not-usable/13852/7 "2020-11-16T07:52:12Z")

</div>

@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:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/e/efb8c8c89fbca4115744fe8bb2a4fe71920f6385.jpeg)

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.

---

<div class="post-metadata">

### Author: ![atlantis](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/atlantis/32/452_2.png) [@atlantis](https://forum.mautic.org/u/atlantis)
#### Post date: [November 16, 2020, 11:28am UTC](https://forum.mautic.org/t/html-e-mails-are-modified-by-mautic-mail-module-not-usable/13852/8 "2020-11-16T11:28:15Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![codes9](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/codes9/32/682_2.png) [@codes9](https://forum.mautic.org/u/codes9)
#### Post date: [November 16, 2020, 2:25pm UTC](https://forum.mautic.org/t/html-e-mails-are-modified-by-mautic-mail-module-not-usable/13852/9 "2020-11-16T14:25:09Z")

</div>

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