GRANT EXECUTE ON SYS.UTL_FILE TO CHADMOON;
GRANT EXECUTE ON UTL_FILE TO CHADMOON;
GRANT EXECUTE ON SYS.UTL_SMTP TO CHADMOON;
GRANT EXECUTE ON UTL_SMTP TO CHADMOON;
ALTER SYSTEM set smtp_out_server = 'smtp.sendgrid.net:25' SCOPE = BOTH;
@?/rdbms/admin/utlmail.sql
@?/rdbms/admin/prvtmail.plb
GRANT EXECUTE ON SYS.UTL_MAIL TO CHADMOON;
GRANT EXECUTE ON UTL_TCP TO CHADMOON;
GRANT EXECUTE ON UTL_MAIL TO CHADMOON;
GRANT EXECUTE ON UTL_HTTP TO CHADMOON;
GRANT EXECUTE ON UTL_INADDR TO CHADMOON;
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;
/