Skip to main content
iVentureTeam

mass_mailing_html

The email designer inside Odoo: themes, snippets, an iframe preview and a code view. It is the rich text editor with several features deliberately switched off, because email is not the web.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated September 8, 20266 min read
Technical namemass_mailing_html
Field typeshtml
Viewsform
Modulemass_mailing, the Email Marketing app
Used in core1 occurrence, the mailing body on the mailing form in mass_mailing
VersionsOdoo 20.0, Odoo 19.0
No-code setupNo. It requires a companion inline field on the model
Alternativeshtml, html_mail, html_composer_message, mailing_filter

What the mailing body editor does

Designing an email is not the same as writing a document. The result has to survive mail clients that stopped supporting modern layout years ago, which is why marketing emails are built from a theme and a set of tested blocks rather than freely composed.

This widget is that design surface. It extends Odoo's rich text editor and adds a theme selector, a snippet palette and an iframe preview, so what you see is rendered in isolation from the rest of the interface. It also enables the code view, which the ordinary editor does not, because someone eventually needs to look at the markup.

Just as important is what it turns off. Checklists, video embedding, collaborative editing, embedded components and the sandboxed preview are all disabled, because none of them makes sense in something that will be delivered as email. The paragraph container is also pinned, so blocks stay predictable.

What this means for your team

The commercial value of an in-product email designer is that campaigns stop needing a separate tool and a separate audience export. The content, the audience, the sending and the statistics all live on the same record, which is the whole argument for doing email marketing inside an ERP rather than beside one.

What makes it work technically is the second field. The editor writes a designed version, and the widget also produces an inline version, which is what the mail server actually sends. That separation is why the design stays editable while the delivered mail is flattened to what email clients accept.

The conditional blocks are the feature most teams underuse. Marking a block with an audience condition means one mailing can show different content to different segments, evaluated per recipient at send time rather than requiring two campaigns. It is worth building into a template rather than discovering later.

Supported options in Odoo 19

One option is read from the view, and several editor settings are forced in the extractor rather than being configurable. The table lists both, because from a view author's point of view the forced settings are the important part: they cannot be turned back on. Read from mass_mailing_html_field.js and the rich text field, Odoo 19.0.

OptionTypeWhat it does
inline_fieldfieldNames the companion field that receives the inline version of the mail, which is what gets sent. Declared as a required prop, so omitting it fails rather than degrading.
filterTemplatesbooleanNarrows the mail templates offered in the designer. Read from the options dictionary under this exact spelling.(default: false)
allowChecklistforced offForced off in the extractor. Checklists do not render reliably in email clients, and no view option can re-enable them.(default: false)
allowVideoforced offForced off in the extractor, for the same reason.(default: false)
codeviewforced onForced on, unlike the ordinary editor, so a designer can inspect and edit the raw markup.(default: true)
isCollaborativeforced offForced off. Collaborative editing is not offered on a mailing body.(default: false)
embeddedComponentsforced offForced off. Embedded interactive components have no meaning in a delivered email.(default: false)
sandboxedPreviewforced offForced off, because the widget provides its own iframe preview instead.(default: false)

The inline field is effectively required. The widget declares it as a non-optional prop, so a view that does not name it will fail rather than degrade. The widget also declares a dependency on the mail's html field, with a comment marking that as deprecated and asking for it to be declared in the view instead.

Working examples

The core usage, trimmed

<field name="body_arch" widget="mass_mailing_html"
       class="o_mail_body_mailing"
       options="{'inline_field': 'body_html'}"/>

Two fields are in play: the one being edited holds the design, and the one named by the option receives the inline version used for sending.

Restricting the template list

<field name="body_arch" widget="mass_mailing_html"
       options="{'inline_field': 'body_html', 'filterTemplates': True}"/>

The second option narrows which mail templates are offered in the designer.

A conditional block

<div data-filter-domain='[["country_id.code","=","BE"]]'>
  Shown only to Belgian recipients
</div>

Before sending, the widget converts that attribute into a server-side condition evaluated per recipient. An unparseable domain becomes a condition that is always false.

How one mailing shows two different things

The most interesting piece is the conditional block handling, because it explains how one mailing shows different content to different people. Before the mail is prepared, the widget walks every element carrying a filter domain attribute, parses it, and replaces it with a template condition that asks whether the recipient matches that domain. At send time each recipient is evaluated and the block is included or dropped.

The failure path is deliberately safe. If the domain cannot be parsed, the element is given a condition that is always false, so the block simply never appears rather than breaking the render or leaking to everyone. A source comment marks this whole routine as work to be moved into a proper plugin, which is a good signal that it will change again.

The extractor is the other half worth reading. It starts from the rich text field's own props, then forces a set of editor settings: checklists off, video off, the base block pinned to paragraphs, migration off, embedded components off, collaboration off, sandboxed preview off, and the code view on. None of those is exposed as an option, so a view cannot re-enable them, which is the correct choice for a surface whose output has to survive email clients.

The component itself carries considerably more: an iframe, a theme selector, a local overlay container for editor toolbars, and careful handling of prop updates so the active theme is computed just before the component is patched. That machinery is what makes the design surface feel separate from the form it lives on.

Version compatibility

VersionStatusNotes
Odoo 20.0Partial / changedNot released. Still registered and still used; the internals and the surrounding form continue to change.
Odoo 19.0VerifiedFirst version in this form, on the current editor. Verified against the shipped source.
Odoo 18.0Not availableThis file does not exist. The mailing editor was built on the previous editor stack.
Odoo 17.0Not availableThis file does not exist.
Odoo 16.0Not availableThis file does not exist.

Upgrade note. The widget in this form is new in Odoo 19, together with the current editor. Earlier versions had a mailing editor built on the previous editor stack under different internals, so any customization of the mailing designer written for Odoo 18 or earlier has to be redone rather than migrated. Views themselves only need the inline field option, which has carried across.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable and this is a large, actively changing file; treat these notes as direction only and check again after release.

The widget survives and continues to move. It is still registered and still used on the mailing form, and the development branch continues reworking its internals along with the rest of the editor stack.

The surrounding form changes more than the widget. On that branch the mailing's audience handling is redesigned, moving from a single saved filter to several dynamic lists, and the recipient domain moves to a savable domain widget. If you customize the mailing form, expect the form around this field to differ more than the field itself.

Common problems and fixes

SymptomCause and fix
The field fails to renderThe inline field option is missing, and it is declared as a required prop. Add options="{'inline_field': 'body_html'}" naming the companion field.
A conditional block never appearsIts filter domain could not be parsed, so the block was given a condition that is always false. Check the domain syntax on the block; a malformed one fails silently by design.
Checklists or videos are unavailableBoth are forced off in the extractor because they do not survive email clients. Expected, and not configurable from the view.
The sent mail looks different from the designerWhat is sent is the inline version written into the companion field, not the design. Test with a real send; the designer is a design surface, not a preview of the final markup.
Templates I expect are missingThe template filter option is on. Remove it, or check which templates match the filter.
A customization broke after upgrading to Odoo 19The mailing designer was rebuilt on the current editor stack in Odoo 19. Redo the customization against the new widget rather than porting the old one.

Mailing body editor vs the alternatives

WidgetBest forKey difference
mass_mailing_htmlDesigning marketing email inside Odoo, with themes, snippets and a previewA rich text editor reconfigured for email, writing a separate inline version for sending
htmlRich content that stays inside OdooNo themes, no snippets, no inline version and no email restrictions
html_mailMessages sent from a chatter or composerEmail-safe markup without the full design surface
html_composer_messageThe full mail composer bodyComposer-specific plugins rather than a design surface
mailing_filterThe mailing's audienceThe recipients half of the same form, not the content

Use the ordinary rich text field for anything that stays inside Odoo, and the mail-oriented variant for messages sent from a chatter or a composer. This widget is for designed marketing email specifically, and it brings requirements with it: the companion inline field, the theme concept and a form laid out to give the designer room.

Frequently asked questions

Why does the widget need a second field?+
Because the design and the delivered mail are different things. The editor works on the design, and the widget writes an inline version into the field named by the inline field option, which is what gets sent.
Can I re-enable checklists or video?+
No. Both are forced off in the extractor, along with collaborative editing, embedded components and the sandboxed preview, because they do not survive email clients.
How do conditional blocks work?+
An element carrying a filter domain attribute is converted into a server-side condition before sending, evaluated per recipient. A domain that cannot be parsed becomes a condition that is always false, so the block never renders.
Why is the code view available here but not elsewhere?+
It is forced on for this widget. Email markup often needs inspecting directly, which is not true of ordinary rich text fields.
Does it exist before Odoo 19?+
Not in this form. Earlier versions had a mailing designer built on the previous editor stack, so customizations written against those internals have to be redone rather than migrated.

Email campaigns run from the same place as your data

Designing, segmenting, sending and measuring in one system is the reason to do email marketing inside Odoo, and it only pays off if the setup is right. We implement Odoo Email Marketing end to end on versions 16 through 19.

Book a free consultation

How this page was produced

The forced editor settings, the inline field prop, the template filter option, the conditional block conversion and its always-false failure path were read from mass_mailing_html_field.js on the Odoo 19.0 branch, with the inherited behavior read from the rich text field in the editor module. The usage and its option come from mass_mailing/views/mailing_mailing_views.xml. Version coverage comes from the absence of this file on the 16.0, 17.0 and 18.0 branches, and the Odoo 20 notes from the public development branch. Spotted an error? Tell us and we will correct the page.