Hello there,
With our application we need to send out emails in formatted text. When we write the email, we use CK Editor to format the text. But when we pass this formatted text to the email 'screen' the email gets sent with the HTML tags and not in rich text.
So I'm struggling how to get the email content formatted, since it seems there's no possibility to use CK Editor for this. Also on the forum I can't find the answer to this issue for ODC applications.
Anyone ideas how this can be accomplished?
Hi,
Did you try using the HTML Element ?
https://success.outsystems.com/documentation/11/reference/outsystems_language/interfaces/designing_screens/html_element/
Or you can try to use the InjectHTML component from the Forge. https://www.outsystems.com/forge/component-overview/7239/injecthtml
Regards,
Daniel
Thank you for your reply, but InjectHTML is a web block, so unfortunately that does not work within an Email. And HTML element is not available for ODC.
Hi Eric,
You are right, and I also overlooked you were talking about ODC.
Next time I will take a bit more time to digest the question, before I reply.
Working around the limitations of the OutSystems platform you could consider to use external software to generate and send the emails, like https://learn.microsoft.com/en-us/graph/api/resources/mail-api-overview?view=graph-rest-1.0
Hello,
As far as I know, what you're trying to do is not possible in Reactive apps (which is also the underlying tech for ODC). There's a very limited set of elements you can use when designing your emails (documentation here), which means there's no way to inject HTML code in the email.
Your only option is to design the email with all the required formatting in Service Studio and pass in as input parameters the pieces of data that you want to display.
Hi Aurelio,
Thank you for your reply.
It's very disappointing to hear that it's not possible. I read that the RichMail extension was available earlier and could solve this issue, but that seems not available for ODC anymore either.
There must be other people facing this problem right? I find it very normal that you want to have several paragraphs or make some text bold/italic within an email. This can't be passed as input parameters, so that would mean a huge limitation in sending emails with Outsystems.
Any ideas how to find a solution for this?
Hello Eric,
I can understand that this limitation is quite disappointing. You can always try to open a support ticket to OS to see what they suggest.
It's far from being an ideal solution, but one possibility would be for you to create your emails in a Traditional Web application (if you have an O11 infrastructure available, of course), and expose the logic to send them via REST web services. In TWA's emails, you can use expressions with the "Escape Content" attribute set to "No", which allows you to easily inject HTML into the email.
AKA OutSystems being greedy and trying to force more AO usage by preventing one email object from being used for multiple different emails with dynamic content.
The only solution to this problem is to use a traditional web app for emails, which defeats the purpose of developing a reactive app.
Hi @Eric van Heesen ,
I am not sure if javascript can be used in email template in odc but if we can use then you can try below javascript to inject html in any container or expression.
document.getElementById("divid").innerHTML = Email Content;
Best
Arun
Not possible
Same issue for reactive apps as well. I had to create a classic web app to generate the needed HTML such that a table would render properly in both web and desktop outlook clients recently. Considering OutSystems advocates responsive design, it kind of sad that their email template implementations are so far behind current email template technologies such as multi-part MIME.