begin
dbms_network_acl_admin.create_acl(acl => 'utl_mail.xml',
description => 'HTTP ACL Access',
principal => 'CHADMOON',
is_grant => TRUE,
privilege => 'connect',
start_date => null,
end_date => null);
dbms_network_acl_admin.add_privilege(acl=> 'utl_mail.xml',
principal => 'CHADMOON',
is_grant => TRUE,
privilege => 'resolve',
start_date => null,
end_date => null);
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (
acl => 'utl_mail.xml',
host => '127.0.0.1',
lower_port => 1,
upper_port => 10000);
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (
acl => 'utl_mail.xml',
host => 'localhost',
lower_port => 1,
upper_port => 10000);
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL (
acl => 'utl_mail.xml',
host => 'smtp.sendgrid.net',
lower_port => 1,
upper_port => 10000);
commit;
end;
/