Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Satya.

Asked: September 30, 2017 - 12:18 am UTC

Last updated: September 30, 2017 - 3:17 pm UTC

Version: 11g Express edition

Viewed 1000+ times

You Asked

Hi Team,
Wanted to know wherher utl_mail is supported in 11g EE.I installed the version in my local windows machine.I am able to connect to it via SQL Developer.
I can see utl_smtp and utl_tcp packages are installed.
I tried to install the utlmail.sql and prvtmail.plb but it is failing.
@$ORACLE_HOME/rdbms/admin/utlmail.sql
SQL> @$ORACLE_HOME/rdbms/admin/prvtmail.plb
Also I am not able to connect via SQL command line.Is there any issues with my installation or utl_mail is not supported in this version.Any other way to send an automated email from DB.Any suggestion or troubleshoot would help.

TIA

and Connor said...

UTL_MAIL arrived in 10g and is supported from all releases since then. It is typically not created automatically, so must be loaded by a sysdba.

You then also need to ensure that

- smtp_out_server is set,
- ACL's are created to allow you to connect via the network to your mail server/port.

But UTL_SMTP is fine as well

https://asktom.oracle.com/pls/asktom/asktom.search?tag=sending-html-using-utl-smtp

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Not installed by default

Andrew, October 02, 2017 - 3:01 pm UTC

From the Oracle 11 docs.
"UTL_MAIL is not installed by default because of the SMTP_OUT_SERVER configuration requirement and the security exposure this involves."

You have to install it by invoking
@?/rdbms/admin/utlmail.sql
and
@?/rdbms/admin/prvtmail.plb

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library