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:
I am using the SmartRichTextEditor Forge component to allow users to modify the email body.
I successfully capture the edited output (HTML with inline CSS) from the widget.
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
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
Hi @Vinod PatidarThanks 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
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
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
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
For quick test, please access this URL: https://personal-4zez02pf.outsystemscloud.com/SandboxReactive/TestSendEmail?_ts=639044421209291994
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:
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