Wednesday, February 8, 2017

Viewing APEX Mail Log and Queue

Send email via APEX using email template

DECLARE
    l_id NUMBER;
BEGIN   
    APEX_UTIL.set_workspace (p_workspace => 'YOUR WORKSPACE NAME HERE');

    l_id :=
        APEX_MAIL.SEND (p_to                   => 'pchiu@xxxxxxx.com',
                        p_from                 => 'no-reply@xxxxxxx.com',
                        p_application_id       => 110,
                        p_template_static_id   => 'BUYBACK_LOA_YEAREND',
                        p_placeholders         => '{' || '}');

    APEX_MAIL.PUSH_QUEUE;
    COMMIT;
END;
/

First you need to change security group to your workspace name before running the query.
BEGIN   
    APEX_UTIL.set_workspace (p_workspace => 'YOUR WORKSPACE NAME HERE');
END;
/

SELECT * from APEX_MAIL_LOG ORDER BY LAST_UPDATED_ON DESC;

SELECT * from APEX_MAIL_QUEUE ORDER BY LAST_UPDATED_ON DESC;

No comments:

Post a Comment