开发者

Error using UTL_MAIL in a SQL procedure

开发者 https://www.devze.com 2023-04-07 19:07 出处:网络
I am attempting to send an开发者_运维知识库 email using a sql procedure, and am getting some errors.Here is my relevant code:

I am attempting to send an开发者_运维知识库 email using a sql procedure, and am getting some errors. Here is my relevant code:

   IF cur_email%FOUND THEN
stu_email := schema.get_person_email_adr(v_id);

 IF send_email = 'Y' THEN

UTL_MAIL.SEND (sender => v_email_from,     -- line of error
               recipients => stu_email,
               subject => v_email_subject,
               mime_type => 'text/html',
               message => v_email_body );
END IF;
END IF;

I will be getting multiple "v_id", and am trying to send an email to each one that I get, so I was also wondering if I am doing that correctly? The error that I am getting is this:

PLS-00201: identifier 'UTL_MAIL' must be declared

I am not sure why I am encountering this, Before I made some of these changes, I never received this error, so I believe that the utl_mail set up is not the problem.

Thanks!


UTL_MAIL is not installed by default, because it requires some configuring on the part of the sysadmin team. Find out more.

So, perhaps it has not been installed, or perhaps EXECUTE privilege on it has not been granted to your stored procedure owner.

0

精彩评论

暂无评论...
验证码 换一张
取 消