-
seek help on utl_mail package!!!
I need to create a procedure to send email daily from Oracle 10g database. I log in as sys and create the procedure. It come across compiling error as PLS-00201. Please help me to figure out where is the problem. Thanks. Here are my code:
CREATE OR REPLACE PROCEDURE db_domain.send_email IS
vSender VARCHAR2(30) := 'person1@company1.com';
vReceipt VARCHAR2(30) :='person2@company2.com';
vSubj VARCHAR2(50) := 'error info';
vMesg VARCHAR2(800);
vMType VARCHAR2(30) := 'text/plain; charset=us-ascii';
BEGIN
SELECT to_char(error_dt, 'mm/dd/yyyy')||'-'||error_code||'-'||error_text||'-'||message Message
INTO vMesg
FROM db_domain.log_table
WHERE rownum = 1;
utl_mail.send(vSender, vReceipt, NULL, NULL, vSubj, vMesg, vMType, NULL);
END;
error message:PLS-00201:identifier 'UTL_MAIL' must be declared.
The UTL_MAIL package is new enhancement in Oracle 10g. I have run
{ORACLE_HOME}/rdbms/admin/utlmail.sql
{ORACLE_HOME}/rdbms/admin/prvtmail.plb
to install it and I also run
ALTER SYSTEM SET smtp_out_server = 'ip_addressort' SCOPE=BOTH;
How could I have to declare UTL_MAIL? please help. Thanks in advance.
-
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|