4 Replies Latest reply: Jan 22, 2013 3:01 PM by AmandaWalsh RSS

    Email in the queue not sent

    n_shah18
      Hi All Apex friends
      I am using 4.2 on glassfish ,linux ,oracle 11 g

      I am trying to make send email work
      create or replace procedure email ( p_email  in    varchar2)
      is
          l_workspace_id      number;
          l_subject           varchar2(2000);
          l_body              clob;
          l_body_html         clob;
           l_email varchar2(40);
      begin
          l_workspace_id := apex_util.find_security_group_id (p_workspace => 'xyz');
          apex_util.set_security_group_id (p_security_group_id => l_workspace_id);
       
       l_email:= p_email;
          l_body := ' ';
          l_subject := 'You have new tasks';
          --if l_email=:P3_CONFIRM_EMAIL_ADDRESS is not null then
         -- email( l_email =>:P3_CONFIRM_EMAIL );
       -- end if;
              l_body_html := '<p/>The following tasks have been added.';
           
           apex_mail.send (
                  p_to        => l_email ,
                  p_from      => 'neel.shah@yahoo.com',
                  p_body      => l_body,
                  p_body_html => l_body_html,
                  p_subj      => l_subject );
        APEX_MAIL.PUSH_QUEUE;
        
      end;
      select * from apex_mail_queue
       
       
       select * from  apex_mail_log
      Both the queries has my TEST email but it not pushing the queue out


      Kindly suggest what to do ?
        • 1. Re: Email in the queue not sent
          VC
          Is there any value populated for MAIL_SEND_ERROR column?
          • 2. Re: Email in the queue not sent
            n_shah18
            yes
            ORA-24247: network access denied by access control list (ACL)
            • 3. Re: Email in the queue not sent
              VC
              Hunk09 wrote:
              yes
              ORA-24247: network access denied by access control list (ACL)
              It is obvious that it was failing with the above error. Google that error or even search the form you will find loads of results.

              like http://oraclehack.blogspot.co.uk/2010/10/ora-24247-network-access-denied-by.html
              • 4. Re: Email in the queue not sent
                AmandaWalsh
                You may need to Enable Network Services in the 11g Database (or get your DBA to do this for you).

                I think the reason being in 11g, Oracle tightened the security so users that needed to access network credentials like LDAP and Email required specific privileges granted. Unfortunately it seems you can’t grant it for the whole database, so it needs to be done for each schema/user on the database.

                See the APEX 4.2 Installation Guide, Setion 3.3.8 on 'Enabling Network Services'
                http://docs.oracle.com/cd/E37097_01/doc/install.42/e35123/otn_install.htm#BEHIFAJD


                Amanda.