This discussion is archived
3 Replies Latest reply: Jan 23, 2013 2:22 AM by Mahmoud_Rabie RSS

Unable to Delete Pending Mail from Queue

jritschel Newbie
Currently Being Moderated
I have a large number of emails in the APEX_MAIL_QUEUE that are actually getting sent, but are not being cleared out of the mail queue. So they keep getting retried, which sends them out multiple times. Is there a way to manually delete these from the queue?

I am using APEX 4.2.0.00.27.
  • 1. Re: Unable to Delete Pending Mail from Queue
    Mahmoud_Rabie Journeyer
    Currently Being Moderated
    Dear jritschel

    Did you have the html message attached as such or did you try sending html mail as text only mail?: http://download.oracle.com/docs/cd/E14373_01/apirefs.32/e13369/apex_mail.htm

    If this question is answered, please mark the thread as closed and assign points where earned..

    Regards
    Mahmoud
  • 2. Re: Unable to Delete Pending Mail from Queue
    jritschel Newbie
    Currently Being Moderated
    It was sent as a text only message. No attachments.
  • 3. Re: Unable to Delete Pending Mail from Queue
    Mahmoud_Rabie Journeyer
    Currently Being Moderated
    The solution is to use

    PUSH_QUEUE Procedure
    Oracle Application Express stores unsent email messages in a table named APEX_MAIL_QUEUE. You can manually deliver mail messages stored in this queue to the specified SMTP gateway by invoking the APEX_MAIL.PUSH_QUEUE procedure.
    Oracle Application Express logs successfully submitted message in the table APEX_MAIL_LOG with the timestamp reflecting your server's local time.
    Keep in mind, the most efficient approach to sending email is to create a background job (using a DBMS_JOB package) to periodically send all mail messages stored in the active mail queue.

    If this question is answered, please mark the thread as closed and assign points where earned..

    Regards
    Mahmoud

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points