Oracle Database - utl_mail package

> Database > Oracle Database

1 - About

How to send a mail with the PL/SQL utl_mail package.

2 - Steps

2.1 - Prerequisites

sqlplus sys/<pwd>
SQL> @$ORACLE_HOME/rdbms/admin/utlmail.sql
SQL> @$ORACLE_HOME/rdbms/admin/prvtmail.plb
ult_mail package is created

2.2 - To send a mail

UTL_MAIL.SEND (
sender =>'mail.id',
recipients =>'mail.id',
cc =>'mail.id',
subject='subject'
message =>'msg')
Advertising