Greetings all,
I have followed the APEX MAIL ATTACHMENT tutorial that is out there and I got it to work where it looped through and let me select which files to attach to the Email but my situation is as follows:
I have a table where I upload a file for viewing. That works fine and when you click the download link, you are given the option to save the file properly.
What I am trying to do is have a button so you can select to send the individual record and attach the pdf file that is already uploaded. I only want to attach the pdf for the specific record.
I have a workspace on apex.oracle.com
workspace name: wfsteadman
user: demo
password demo
Application Name: 37102. EMAIL ATTACHMENTS
application: http://apex.oracle.com/pls/apex/f?p=37102:1
In my process I am using the following:
DECLARE
l_id varchar2(4000);
l_index number;
BEGIN
l_id := APEX_MAIL.SEND(
p_to => :P4_TO,
p_from => :P4_FROM,
p_subj => :P4_SUBJECT,
p_body => 'Testing This Out');
APEX_MAIL.ADD_ATTACHMENT(
p_mail_id => l_id,
p_attachment => :P4_ATTACHMENT,
p_filename => :P4_FILENAME,
p_mime_type => :P4_MIIMETYPE);
END;
and I have tried:
DECLARE
l_id number;
l_index number;
BEGIN
l_id := APEX_MAIL.SEND(
p_to => :P4_TO,
p_from => :P4_FROM,
p_subj => :P4_SUBJECT,
p_body => 'Testing This Out');
APEX_MAIL.ADD_ATTACHMENT(
p_mail_id => l_id,
p_attachment => :P4_ATTACHMENT,
p_filename => :P4_FILENAME,
p_mime_type => :P4_MIIMETYPE);
END;
I removed all the looping assuming that since it is only 1 file that I would not need to do a loop, but maybe I am misunderstanding the process.
Goal, the folks update their record, then I want them to have a button that says send Email and they select the from, to and subject and the file that is associated with that record will be an attachment.
Any assistance would be appreciated and if you can look at my application and see a quick fix that would rock as I am about to go on vacation and would like to get this implemented before I go.
Thanks in advance
Wally