How is your experience with the OutSystems Community?
29
Views
10
Comments
[Smart Rich Text Editor - Lite] Rendering HTML in Reactive Email Template
smart-rich-text-editor-lite
Reactive icon
Forge asset by Gourav Shrivastava
Application Type
Reactive
Service Studio Version
11.55.54 (Build 64518)

Hi everyone,

I am working on a feature in OutSystems Reactive where users can edit an email's content before it is sent.

The Scenario:

  1. I am using the SmartRichTextEditor Forge component to allow users to modify the email body.

  2. I successfully capture the edited output (HTML with inline CSS) from the widget.

  3. I pass this HTML string into an Input Parameter of my Email Template.

The Problem: When the email is received, the content area is either completely empty or shows raw HTML tags as plain text.

What I have tried:

  • Expression Widget: Using an Expression to display the variable results in escaped HTML (raw tags visible). I noticed that the "Escape Content = No" property is not available in Reactive Email Expressions.

  • Container with innerHTML: I tried adding the innerHTML attribute to a Container. However, the email still arrives with no content in the body.

  • JavaScript: I attempted to use a JavaScript node to inject the HTML, but I realize now that email clients block JS execution.

How can I correctly render this dynamic HTML inside a Reactive Email template so that it displays the formatted text instead of an empty space or raw code?

Thanks 
Ananth


2019-07-01 07-16-04
Vinod Patidar

Hi @P Anantha Raman 

You need to install below traditional application to send HTML email.

https://www.outsystems.com/forge/component-overview/14371/send-html-email-o11


Thanks

Vinod

2026-02-25 07-20-39
P Anantha Raman

Hi @Vinod Patidar

Thanks for the link! I'll give that Forge component a try. 

I am looking for a Reactive-native solution to handle dynamic HTML in email templates. 
Since the 'Escape Content' property is missing in Reactive Email expressions, have you successfully used a different method that doesn't rely on Traditional Web components 

2023-10-16 05-50-48
Shingo Lam

Hi @P Anantha Raman ,

The forge component that @Vinod Kumar R sent is for traditional web, you can use the reactive to call the traditional web to handle this. Its is the first solution

If you need the reactive one, you email should receive the text input and use expression to show it in email. The text should be wrapped up with ProcessHTML before passing it as parameter to the email

2026-02-25 07-20-39
P Anantha Raman

Hi @Shingo Lam


I followed the suggested approach and passed the HTML string into the email parameter.

However, the email content is not rendering as formatted text; instead, it displays the raw HTML tags in the inbox.

I am using an expression to show the input, but it seems the platform is escaping the HTML.

Thanks 

2023-10-16 05-50-48
Shingo Lam

Sorry my bad, the ProcessHTML of HTMLRenderer is out-date, just use for the legacy internal apps only.

Please view my sample for more detail. I use the HTMLToText forge component to handle the HTML part of email

Hope this help

SandboxReactive.oml
2026-03-20 01-28-51
Saugat Biswas

Hi @P Anantha Raman,

Reactive Email templates DO NOT execute screen widgets or DOM logic. They only render server-side HTML that is already final and safe at send time.

Email templates in OutSystems are NOT Reactive screens. 

They: 

  • Don’t evaluate widgets 
  • Don’t apply innerHTML 
  • Don’t run JavaScript 
  • Don’t have Reactive properties like Escape Content 

They only do one thing: Render raw HTML strings that are already trusted and final

Use HTML Literal / Expression with already‑built HTML and let the Email engine render it directly, But the HTML must meet three strict rules.

Rule 1: You must pass final HTML, not “Reactive UI output

Rule 2: The HTML must be placed directly into the Email Body. In the Email Body, use: <%EmailBodyHTML%>

Rule 3: HTML must be Email‑Safe (Inline styles only, Simple tags only like <p>, <br>, <strong>, <em>, <table>, <tr>, <td>, <img>, <a>)


Hope this helps,

Cheers,

Saugat

2018-07-06 11-13-55
Nathan Hobbs

OutSystems intentionally removed the ability to pass HTML to an email template and display it in an expression as raw, either for security reasons, or to force customers to use more AOs.

The best way around it is to do JUST email in Traditional Web.

I know this doesn't help if you want to avoid tradweb.

2026-02-26 06-29-24
Rahul
 
MVP

Why it's missing in Reactive Web:

In Traditional Web, the Expression widget rendered server-side, so OutSystems could offer an "Escape Content" toggle to let you output raw HTML/JS directly into the page.

In Reactive Web, rendering happens client-side through the React/Screen.js layer, and OutSystems deliberately removed that toggle as a security-by-default decision — to prevent developers from accidentally introducing XSS vulnerabilities by injecting unescaped HTML/JS into the DOM. Every Expression in Reactive is escaped by default, with no UI option to turn it off.

This has come up repeatedly in the OutSystems community, and the platform team's stance has consistently been: it's a deliberate omission, not a missing feature — you're expected to build UI with widgets/blocks instead of raw HTML strings.

If you genuinely need unescaped HTML in Reactive:

  • Use a JavaScript node / client action to set innerHTML on an element (via a CSS selector or a ref), instead of relying on the Expression widget.
  • Build a small custom widget (via Forge or your own) that internally handles unescaped rendering safely.
  • Community components exist

Whichever route you take, make sure any dynamic content going in unescaped is sanitized — that's exactly the class of vulnerability OutSystems removed this option to avoid.

2018-07-06 11-13-55
Nathan Hobbs


Hi Rahul,

Many thanks for your response.

"you're expected to build UI with widgets/blocks instead of raw HTML strings"

This topic is explicitly about emails... which I would hope are being sent from the server side. :D

Kind Regards

Nathan


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.