FROM dba_network_acls;
-- Create ACL and privilege
begin
dbms_network_acl_admin.create_acl (
acl => 'utl_mail.xml',
description => 'Allow mail to be send',
principal => 'APPS',
is_grant => TRUE,
privilege => 'connect'
);
commit;
end;
--Add Privilege
begin
dbms_network_acl_admin.add_privilege (
acl => 'utl_mail.xml',
principal => 'APPS',
is_grant => TRUE,
privilege => 'resolve'
);
commit;
end
--Test1
begin
dbms_network_acl_admin.assign_acl(
acl => 'utl_mail.xml',
host => 'mail.company.com.sa'
);
commit;
end;
--Test2
begin
utl_mail.send(
sender => 'fromuser@company.com',
recipients => 'myname@company.com,user2@company.com, user3@company.com',
message => 'Test E-mail from ERP Database'
);
commit;
end;
No comments:
Post a Comment