Error using UTL_MAIL in a SQL procedure
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.
精彩评论