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!

Need the table border in apex_mail

KJChellamFeb 26 2020 — edited Feb 27 2020

Hi,

I'm using Apex 5.1.4.00.08 and database 11g.

I have a table in rich text editor as below.

pastedImage_2.png

source code for the table is

begin

:P298_RTE := '

<style type="text/css">table.tbl.tbl,

.tbl.tbl.tbl th,

.tbl.tbl.tbl td {

border: 1px solid blue;

border-collapse: collapse;

}

td {background-color: aliceblue}

</style>

<h2>Add a border to a table:</h2>

<table class="tbl">

\<tbody>

    \<tr>

        \<th  >Firstname\</th>\<th>Lastname\</th>\<th> Age \</th>

    \</tr>

    \<tr>

        \<td  >Peter\</td>

        \<td>Griffin\</td>

        \<td> 40 \</td>

    \</tr>

    \<tr>

        \<td  >Lois\</td>

        \<td  >Griffin\</td>

        \<td> 45 \</td>

    \</tr>

\</tbody>

</table>

';

end;

and the rich text editor has the javacode :

function (config) {

config.extraAllowedContent = 'style';

 config.extraAllowedContent = 'style;\*{border\*}';

return config;

}

When I mail it using below code, I'm not getting the table with colored border. Instead i'm getting pastedImage_8.pngin the mail.

BEGIN

apex_mail.send(

p\_to =>['KJC@gmail.com](mailto:'KJC@gmail.com)',

p\_cc => ' ',

p\_from => ['it@gmail.com](mailto:'it@gmail.com)',

p\_body => '  ',

p\_body\_html => :P298\_RTE ,

p\_subj => 'Testing on the table style in mailing'

);

APEX\_MAIL.PUSH\_QUEUE;

COMMIT;

exception

when others then

APEX_ERROR.ADD_ERROR(

p_message => 'An error had occured. ' ||SQLERRM ,

p_additional_info => 'Mailing error',

p_display_location => apex_error.c_inline_in_notification);

END;

Please help. my previous thread Rich text editor formatting table in Apex 5.1.4 regarding this is here.

Thanks,

KJ

This post has been answered by InoL on Feb 26 2020
Jump to Answer
Comments
Post Details
Added on Feb 26 2020
7 comments
460 views