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!

APEX-Email Send Automation

Abhishek Gampala7 hours ago

Hi Community,

Below is the code I want to execute and the error I am getting is pasted below:

ORA-06550: line 35, column 3: PLS-00306: wrong number or types of arguments in call to 'SEND'

if I am removing p_html I am not getting that error, I have seen the documentation it does not have p_html parameter in APEX_MAIL syntax. looking for some other workaround

declare
l_html clob;
begin
-- 🧩 Start HTML block
l_html := '<h2>test</h2>' ||
'<p><strong>Request ID:</strong> ' || :price_chg_id || '</p>' ||
'<table border="1" cellpadding="5" cellspacing="0" style="border-collapse: collapse;">' ||
'<tr style="background-color:#f2f2f2;">' ||
'<th>a</th>' ||
'<th>b</th>' ||
'<th>c</th>' ||
'<th>d</th>' ||
'</tr>';

-- 🧩 Loop over child records for this id
for r in (
select a, b, c
from table
where id = :id
) loop
l_html := l_html ||
'<tr>' ||
'<td>' || r.a || '</td>' ||
'<td>' || r.b || '</td>' ||
'<td>' || r.c || '</td>' ||
'</tr>';
end loop;

-- 🧩 End table and footer
l_html := l_html ||
'</table>' ||
'<p>Please log in to the application to track this request.</p>';

-- ✅ Send the email (test address)
apex_mail.send(
p_to => 'a', -- 🔁 Replace with actual test email
p_from => 'b', -- ✅ Must match your APEX email config
p_subj => ',
p_body => '',
p_body_html => l_html,
p_application_id => 156
);

-- 🚀 Send the email immediately
apex_mail.push_queue;
end;

@steve-muench-oracle , @inol, @najeeb-ullah-ali-khel need your comments ?

Comments
Post Details
Added 7 hours ago
3 comments
39 views