Question: I want to be able to save a copy of
an e-mail that I am generating in a PL/SQL stored procedure.
I want to know how to save the e-mail as a plain OS e-mail and
how to save an e-mail inside an Oracle table.
Are there standard packages for saving Oracle e-mails?
Answer: To start, see this procedure for
sending e-mail via PL/SQL from Oracle.
There are many ways to save a copy of an e-mail that is sent via
- Set a "cc" copy to the IP address of the Oracle database
e-mail will be saved in the standard OS e-mail directory.
- Create a table with e CLOB column for the text and
write PL/SQL to save the sender, recipients(s) and text and
details of the e-mail. You can also save the e-mail text to a
flat file using the
- In ApEx, you can also use
wwv_flow_mail to save an e-mail copy.
- You can send and save e-mails with the
html-email and utl_smtp packages.
I'm sure there are many other ways of saving copies of outgoing
e-mail from Oracle; it depends on your needs . . . .
Get the Complete
Oracle SQL Tuning Information
The landmark book
SQL Tuning The Definitive Reference" is
filled with valuable information on Oracle SQL Tuning.
This book includes scripts and tools to hypercharge Oracle 11g
performance and you can
for 30% off directly from the publisher.