In order to send emails from Oracle APEX you can use the APEX_MAIL API.
You can send plain text or HTML emails while defining the sender, recipients and bccs.
Note : The package is built using the Oracle supplied UTL_SMTP package so the UTL_SMTP package must be installed and functioning in order to use APEX_MAIL.
Here is an example function that sends a plain text email and an HTML email :
DECLARE
v_subject VARCHAR2(100);
v_sender VARCHAR2(100);
v_recipient VARCHAR2(100);
v_cc VARCHAR2(100);
v_bcc VARCHAR2(100);
v_body VARCHAR2(4000);
v_body_html VARCHAR2(4000);
BEGIN
v_subject := \'Email Subject\';
v_sender := \'sender@example.com\';
v_recipient := \'recipient@example.com\';
v_cc := \'\';
v_bcc := \'\';
v_body := \'Some text\' || chr(10) || \'more text here\';
v_body_html := \'Some text<br />more text here\';
-- Send plain text email
APEX_MAIL.SEND(
P_TO => v_recipient,
P_FROM => v_sender,
P_CC => v_cc,
P_BCC => v_bcc,
P_SUBJ => v_subject,
P_BODY => v_body);
-- Send HTML email
APEX_MAIL.SEND(
P_TO => v_recipient,
P_FROM => v_sender,
P_CC => v_cc,
P_BCC => v_bcc,
P_SUBJ => v_subject,
P_BODY => v_body,
P_BODY_HTML => v_body_html);
END;
-- Flush queue
APEX_MAIL.PUSH_QUEUE;