Professional Documents
Culture Documents
In order to send e-mail within 10g you must install and set up the UTL_MAIL package.
SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
Package created.
Synonym created.
No errors.
System altered.
That's it! The installation and setup for UTL_MAIL is complete. The UTL_MAIL
package only has one procedure, called Send, for sending e-mail (see below for the
syntax for the Send procedure). This package bundles the e-mail message and sends it to
the UTL_SMTP package, and then the e-mail message is sent to the SMTP server.
I've created a database trigger that will send an e-mail using UTL_MAIL:
Database shutdown using UTL_MAIL
There are two other procedures within the UTL_MAIL package that make life easy:
UTL_MAIL.ATTACH_VARCHAR2 and UTL_MAIL.ATTACH_RAW. These
procedures are for varchar2 and raw attachments, respectively.