mjmlio / mjml

MJML: the only framework that makes responsive-email easy
https://mjml.io
MIT License
17.03k stars 959 forks source link

Converted MJML not rendering correctly? #723

Closed ninetyxtwo closed 7 years ago

ninetyxtwo commented 7 years ago

Disclaimer, I'm still very new to MJML; so I'm not sure if I'm just missing something or not. Anyways, I use Odoo Enterprise with the Mass Mailer app for email marketing. I think MJML is great and I've created a basic layout with it. However, the problem starts when I convert MJML to HTML and import the code into Odoo.

It seems that Odoo removes everything not found inside the , , and tags of any code once I send out the email for testing so everything comes out as one column in the final product.

Based on what I've read, I need to run my HTML code through a service like inliner.cm to make all the css show up inline? I did this, but I don't think there were any changes to the codes I made, or even one of the templates available on the mjml site. I copy and paste my "inlined" code into Odoo but the same thing happens.

Not entirely sure if I'm doing it right. Anyone have any ideas?

ngarnier commented 7 years ago

Hi @ninetyxtwo, first, do not run the HTML generated by MJML through an inliner. MJML is already inlining the styles to inline, so if anything, this will break styles.

I'm not sure to understand exactly what alterations Odoo is making to the HTML. Maybe it could be worth it to compare the original HTML you import and the HTML after alteration with something like https://www.diffchecker.com/ to see exactly what's happening?

Finally, isn't there any "expert" mode in Odoo to make sure they don't do any modification to the file you import?

iRyusa commented 7 years ago

Hi @ninetyxtwo any news on that ?

iRyusa commented 7 years ago

I'm closing this one, feel free to reopen if you can provide more informations !