PLS-00201: identifier 'UTL_MAIL' must be declared [message #664150] |
Wed, 05 July 2017 06:21 |
grpatwari
Messages: 288 Registered: June 2008 Location: Hyderabad
|
Senior Member |
|
|
Hi,
This is the first time I am using utl_mail. I would like to send jobs success/failure status mails to recipients so I am using utl_mail procedure for testing purpose. I have followed the below link still I am getting the error. Please advice on this.
http://dbaclass.com/article/how-to-send-mail-using-utl_mail-in-oracle-11g/
DECLARE
vSender VARCHAR2(30) := 'gprao@yahoo.com';
vRecip VARCHAR2(30) := 'gprao@yahoo.com';
vSubj VARCHAR2(50) := 'hi';
vMesg VARCHAR2(4000) := 'test';
vMType VARCHAR2(300) := 'text/plain; charset=us-ascii';
BEGIN
utl_mail.send (vSender, vRecip, NULL, NULL, vSubj, vMesg, vMType, NULL);
END;
Error starting at line : 1 in command -
DECLARE
vSender VARCHAR2(30) := 'gajananrao.patwari@tcs.com';
vRecip VARCHAR2(30) := 'gajananrao.patwari@tcs.com';
vSubj VARCHAR2(50) := 'hi';
vMesg VARCHAR2(4000) := 'test';
vMType VARCHAR2(300) := 'text/plain; charset=us-ascii';
BEGIN
utl_mail.send (vSender, vRecip, NULL, NULL, vSubj, vMesg, vMType, NULL);
END;
Error report -
ORA-06550: line 8, column 1:
PLS-00201: identifier 'UTL_MAIL' must be declared
ORA-06550: line 8, column 1:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
|
|
|
|
|
Re: PLS-00201: identifier 'UTL_MAIL' must be declared [message #664161 is a reply to message #664154] |
Wed, 05 July 2017 14:05 |
Bill B
Messages: 1971 Registered: December 2004
|
Senior Member |
|
|
also the creation of the utl_mail package MUST be done as the SYS user logged in with the SYSDBA privilege. You will also need to specify the IP/DNS address of the SMTP server that you are attaching to. It is all described in the documentation on installing the UTL_MAIL package
|
|
|
|
|