Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

attach a remote file to an email in oracle apex

AnuswadhFeb 10 2016 — edited Feb 12 2016

I know it is possible to send mail through oracle apex using apex mail with an attachment with the following code -

    DECLARE

        l_id NUMBER;

    BEGIN

        l_id := APEX_MAIL.SEND(

            p_to        => 'fred@flintstone.com',

            p_from      => 'barney@rubble.com',

            p_subj      => 'APEX_MAIL with attachment',

            p_body      => 'Please review the attachment.',

            p_body_html => '<b>Please</b> review the attachment');

        FOR c1 IN (SELECT filename, blob_content, mime_type

            FROM APEX_APPLICATION_FILES

            WHERE ID IN (123,456)) LOOP

   

            APEX_MAIL.ADD_ATTACHMENT(

                p_mail_id    => l_id,

                p_attachment => c1.blob_content,

                p_filename   => c1.filename,

                p_mime_type  => c1.mime_type);

            END LOOP;

        COMMIT;

    END;

     /

but ,I want to attach a remote file to a mail sent through oracle apex instead of blob content

         

            p_attachment => c1.blob_content,

            

i.e., i want to attach a file for example `D:\sample.pdf` as attachment in the mail.

  

 

I want to know if it is possible and if possible then how?

This post has been answered by smoliveira on Feb 10 2016
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 11 2016
Added on Feb 10 2016
3 comments
2,226 views