Search code examples
oracle-databaseemailhtml-emailresponsys

Rendering HTML from string in email using Oracle Responsys


I'm looking to render html by passing a string to Responsys.

DynamicVariable.TEXT would be a string that looks like:

<button style="background-color: red; color: white; padding: 25px; border-radius: 4px; border: none; font-size: 18px; font-weight: bold">
  Click Here
</button>

I've tried using ?html

<body bgcolor="white" style="margin: 0px; padding: 0px;">
  ${DynamicVariable.TEXT?html}
</body>

Also tried <#escape x as x?html>:

<body bgcolor="white" style="margin: 0px; padding: 0px;">
  <#escape x as x?html>
    <#noescape>${DynamicVariable.TEXT}</#noescape>
  </#escape>
</body>

As well as <#noescape>

<body bgcolor="white" style="margin: 0px; padding: 0px;">
  <#noescape>${DynamicVariable.TEXT}</#noescape>
</body>

but none of these work. Any help would be greatly appreciated!


Solution

  • I found the answer.

    Using <#noescape> is correct. However, the code was not rendering because you need to leverage a document that is saved in the Content Library within Responsys.

    <body bgcolor="white" style="margin: 0px; padding: 0px;">
      <#noescape>${DynamicVariable.TEXT}</#noescape>
    </body>