This discussion is archived
4 Replies Latest reply: Nov 15, 2013 9:08 AM by Tom Petrus RSS

Mail gets stuck in apex_mail_queue table temporarily

paddepal Newbie
Currently Being Moderated

Hi,

 

I'm using apex version 4.1.0.00.32 on 11gr2 Oracle database. When sending emails using the apex_mail package I get no errors, but emails are 'stuck' in the apex_mail_queue. It takes about 2 -to- 3 hours to actually receive the intended email. Originally I thought this could be ACL or SMTP related error, but don't think so. I tried issuing the below commands after the apex_mail.send call, but is no help.

{code}

   APEX_MAIL.PUSH_QUEUE;

   APEX_MAIL.PUSH_QUEUE_BACKGROUND;

{code}

The emails are eventually delivered but there seems to be a lag time. This happens Only on one of the Databases instances and works fine on a different instance. I have compared Instance Settings between these two databases and can't notice anything. Can't really figure out why ?

{code}

BEGIN

   wwv_flow_api.set_security_group_id (XYZ);

   apex_mail.send (

      p_to          =>   'test@domain.com',

      p_from        => 'test@domain.com',

      p_body        => 'Send email from Apex',

      p_body_html   => 'Send email from Apex',

      p_subj        => 'Send email from Apex',

      p_cc          => '',                            

      p_bcc         => ''

);

   APEX_MAIL.PUSH_QUEUE;

   APEX_MAIL.PUSH_QUEUE_BACKGROUND;

   COMMIT;

END;

{code}

 

Anyone any ideas?

 

Thanks,

Prashanth

Legend

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