Mail Inline CSS

Convert style tags in inline style in your mails

Technical Name:
  • Odoo Version

Mail Inline CSS

When you send HTML emails you can't use style tags but instead you have to put inline style attributes on every element. So from this:

You want this:

This module use premailer library to do this.

It parses an HTML page, looks up style blocks and parses the CSS. It then uses the lxml.html parser to modify the DOM tree of the page accordingly.


To install this module, you need first to install premailer python library with:


Just use any mail template as Odoo standard feature

Try me on Runbot


Odoo with module web_editor already implements this feature on the client side (js). This module brings this server side feature for cases without js part. It could the more stable way over the Odoo versions with a stable api in a dedicated library with adhoc python unit tests.

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smash it by providing detailed and welcomed feedback.



  • Odoo Community Association: Icon.


Do not contact contributors directly about support or help with technical issues.


The development of this module has been financially supported by:

  • Akretion


Odoo Community Association

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

To contribute to this module, please visit

This is a preview of the recently viewed products by the user.
Once the user has seen at least one product this snippet will be visible.

Recently viewed Products