Follow these steps to install UTL_MAIL package in Oracle 11g.

  1. Install the UTL_MAIL script as following:
  • In Windows:

Change the path below with your Oracle Home path.

sqlplus sys/syspsw@orcl as sysdba
@C:\app\Administrator\product\11.2.0\dbhome_1\RDBMS\ADMIN\utlmail.sql
@C:\app\Administrator\product\11.2.0\dbhome_1\RDBMS\ADMIN\prvtmail.plb
  • In Linux:
sqlplus sys/syspsw@orcl as sysdba
@$ORACLE_HOME/rdbms/admin/utlmail.sql
@$ORACLE_HOME/rdbms/admin/prvtmail.plb
  1. Grant the privilege to all the users for UTL_MAIL package.
grant execute on utl_mail to public;

You can give a specific username instead of public. If you will not give the grant on UTL_MAIL package, then you may get the following error:

PLS-00201: identifier 'UTL_MAIL' must be declared

See also:

Vinish Kapoor

An Oracle Apex Consultant, Oracle ACE, and founder of foxinfotech.in and orclqa.com a question and answer forum for developers.

Leave a Reply