Phanny
Phanny

Reputation: 221

ORACLE APEX_MAIL

I am trying to send mail with apex_mail

Here is my configuration , but i did receive any mails

Is there something missing?

Thanks enter image description here

Upvotes: 0

Views: 182

Answers (1)

Paweł Prusinowski
Paweł Prusinowski

Reputation: 416

Execute this code as sysdba to grant permissions for your DB User to connect to smtp server:

begin


  dbms_network_acl_admin.create_acl
  ( 
    acl =>         'mail.xml',
    description => 'Access to smtp server',
    principal =>   'DBUser', -- DB Schema (grantee)
    is_grant =>    true,
    privilege =>   'connect',
    start_date  => null, 
    end_date  =>   null
  );

  dbms_network_acl_admin.assign_acl(
    acl =>         'mail.xml',
    host =>        'mail.muncipaldata.com', -- SMTP host
    lower_port =>  1025,
    upper_port =>  1025
  );  

  DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(
    acl =>         'mail.xml',
    principal =>   'DBUser', -- DB Schema (grantee)
    is_grant  =>   true,
    privilege =>   'resolve',
    start_date  => null, 
    end_date  =>   null
  );

end;  

Upvotes: 2

Related Questions