Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

HTML not shown properly when using Apex Mail Templates with substitution string

Christine Ziegelmeier-OnstottSep 18 2024 — edited Sep 20 2024

After upgrade to Apex 24.1 we are experiencing the following issue:

within a pl/sql block we are using the following code:


apex_mail.send (
p_to => v_to,
p_application_id => 999,
p_template_static_id => 'TEMPLATE_NAME',
p_placeholders => '{' ||
' ,"TABULAR_DATA":' || apex_json.stringify( l_tabular_data ) ||
'}' );

Within the eMail-Template html body is set to the following:

<!DOCTYPE html>
<html>
<body>
<p>…. </p>
<br />
<p>
#TABULAR_DATA#
</p>
</body>
</html>

Until the upgrade this worked perfectly and there was a table displayed within the sent email.
Now it doesn't work. Instead in the email the html itself is shown.

Example:

<table style="background-color:white;"><tbody><tr><td style="padding:9.0pt;vertical-align:top;"><p><span style="color:#3E3E3E;">Bitte xxx überprüfen.&nbsp;</span></p><p>&nbsp;</p><p><span style="color:#3E3E3E;">&lt;head&gt;&lt;style&gt;.my_table {font-family: arial, Helvetica, sans-serif;border-collapse: collapse;width: 100%;}.my_table th {background-color: #ff6666;border: 1px solid #dddddd;text-align: left;padding: 8px;}.my_table td {background-color: #ffe6e6;border: 1px solid #dddddd;text-align: left;padding-left: 8px;}&lt;/style&gt;&lt;/head&gt;&lt;table class="my_table"&gt;&lt;tr&gt;&lt;th&gt;ID&lt;/th&gt;&lt;th&gt;XXX&lt;/th&gt;&lt;th&gt;NAME&lt;/th&gt;&lt;th&gt;TIME&lt;/th&gt;&lt;th&gt;RRRR&lt;/th&gt;&lt;th&gt;RC&lt;/th&gt;&lt;th&gt;TEXT&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;15502&lt;/td&gt;&lt;td&gt;blabla&lt;/td&gt;&lt;td&gt;check blabla&lt;/td&gt;&lt;td&gt;31.12.2023 12:56:13&lt;/td&gt;&lt;td&gt;ERROR&lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;td&gt;Fehler! &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&nbsp;</span></p></td></tr></tbody></table>

We have not been able to find a solution yet.
I'd be greatful for any and all advice.

edit 20.09.2024: using #TABULAR_DATA!RAW# did not make a difference. The email still displayed the html string.

Comments
Post Details
Added on Sep 18 2024
2 comments
407 views