29.6 PREPARE_TEMPLATE Procedure
Procedure to return a formatted mail based on an e-mail template where the placeholders specified as JSON string are substituted.
Syntax
PROCEDURE PREPARE_TEMPLATE (
p_static_id IN VARCHAR2,
p_placeholders IN CLOB,
p_application_id IN NUMBER DEFAULT,
p_subject OUT VARCHAR2,
p_html OUT CLOB,
p_text OUT CLOB );
Parameters
Table 29-3 PREPARE_TEMPLATE Parameters
Parameters | Description |
---|---|
|
|
|
|
|
|
|
|
|
|
|
Example
declare
l_subject varchar2( 4000 );
l_html clob;
l_text clob;
begin
apex_mail.prepare_template (
p_static_id => 'ORDER',
p_placeholders => '{ "ORDER_NUMBER": 5321, "ORDER_DATE": "01-Feb-2018", "ORDER_TOTAL": "$12,000" }',
p_subject => l_subject,
p_html => l_html,
p_text => l_text );
end;
Parent topic: APEX_MAIL