Skip to Main Content
Feature Request FR-3694
Product Area APIs
Status OPEN

32 Voters

add the concept of “priority” in the APEX mail queue

az_tawaha Public
· Mar 14 2024

Idea Summary
add the concept of “priority” in the APEX mail queue to prioritise some important emails like OTP or password reset emails over all other emails in the mail queue

Use Case
We have a system that sending thousands of emails at once, those emails are notifications for tasks assigned to users to start their tasks in the platform.

in the same time, we have other users who might forogot their password and need to reset their passwords, if they decided to use the forgot password option, the system will put the password recovery in the mail queue, which will be frustrating to wait 10 minutes until the queue cleared completely and reach to the password recovery email.

Adding a new option to push an email as a priority over all emails in the queue will be very helpfull.

Preferred Solution (Optional)
Add a new optional parameter to the apex_mail.send

or add a new function that picking specific email to be sent immediatly wothout going to the mail queue.

This idea is open.

Known Duplicates



  • ino.laurensse OP 2 months ago

    Currently we use our own email process using utl_smtp next to apex_mail to send these priority emails. Would be a good option in apex_mail to set a priority to skip the queue.

  • ej egyed OP 7 weeks ago

    Adding a parameter to the APEX_MAIL.SEND procedure to send immediately could be a problem if you need to add an attachment to the email. I think adding an optional parameter to the APEX_MAIL.PUSH_QUEUE procedure to specify a specific mail would be better and it could be left null to send all emails in the queue.

        p_smtp_hostname     IN VARCHAR2 DEFAULT NULL,
        p_smtp_portno       IN NUMBER   DEFAULT NULL,
        p_mail_id           IN APEX_MAIL_QUEUE.ID%TYPE DEFAULT NULL );
  • jens.kaschuba OP 5 weeks ago

    Please have also a look into FR-3717 which is not really a dublicate ;-)
    This and the FR-3717 should be developed together. It makes no sense to have a prioritized queue handling wotgh the possibilty to set the mail prio it self.

  • jayson hanes Admin OP 5 weeks ago

    Duplicate in the ideas context also can mean similar.

  • tcaruth OP 4 weeks ago

    Since you haven't elaborated, I think you're misunderstanding how dissimilar the ideas are.

    FR-3694 is asking for a way to bump a email's priority in the mail queue, meaning if there is already 1000 messages pending, I can stick a particular one in the queue to send next rather than waiting for the queue to empty before sending my message.

    FR-3717 is asking for a header. I linked some references in the comments of that ticket.