2 Replies Latest reply: Mar 6, 2014 1:45 AM by Tom Petrus RSS

    apex_mail.send for external emails

    Gor_Mahia

      All,

      i am able to send emails with attachments internally(within my portal group) but i cant send emails to public accounts like hotmail, gmail,yahoo accounts,

      How can i change this code so to send emails internally as well as externally?

       

      i am using sample code below,

       

      FOR r_member IN (SELECT unique c001 FROM apex_collections WHERE collection_name = 'SEND_MEMBERS') LOOP

      apex_mail.send

      (p_to => r_member.c001

      ,p_from => l_from

      ,p_body => l_body

      ,p_body_html => l_body_html

      ,p_subj => l_subj);

      END LOOP;

      -- push apex mail queue

      apex_mail.push_queue;

       

      . . . . . . .

       

      thank you.

        • 1. Re: apex_mail.send for external emails
          swesley_perth

          I'd say this would be an e-mail server restriction, not APEX.

          Maybe there is something in the ACL permissions that would need adjusting, not sure.

           

          Login to the INTERNAL workspace and check the error being reported in the mail queue.

          • 2. Re: apex_mail.send for external emails
            Tom Petrus

            I agree with Wesley that this is probably an error not relating to apex_mail, but rather to the network acl or something in the mailserver.

             

            And FYI: you don't really need to log in to the internal workspace (and you won't always get access to it ...). You can also check the views APEX_MAIL_QUEUE (to see what is queued up) and APEX_MAIL_LOG (log with sent mails and/or error message). Eg:

            SELECT * FROM apex_mail_log ORDER BY last_updated_on DESC