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?