We have been using an older version of Apex for about 10 years now and now want to set up email capability for sending reports as attachments. I have scoured the internet for the requirements to use but am getting confused with all the different answers. We need to connect to an external smtp server. What exactly do I need to get in place to get this to work on this older version of Apex? Please let me know if you need more info to better answer this question. Thank you.
APEX 4 ? wow :-)
Easiest way would be to install UTL_MAIL and use that.
conn sys/password as sysdba
@$ORACLE_HOME/rdbms/admin/utlmail.sql
@$ORACLE_HOME/rdbms/admin/prvtmail.plb
conn sys/password as sysdba
alter system set smtp_out_server='smtp.domain.com' scope=spfile;
-- instance restart only necessary in 10gr1.
shutdown immediate
startup
begin
utl_mail.send_attach_varchar2 (
sender => 'akstom@mysite.com',
recipients => 'recipient1@mysite.com,recipient2@mysite.com',
cc => 'recipient3@mysite.com',
bcc => 'recipient4@mysite.com',
subject => 'This is the subject',
message => 'This is the message',
attachment => 'This is the text attachment.',
att_filename => 'filename.txt'
);
end;
/
but come on ... its time to upgrade!