КАК
SMTP Host Address : smtp.mailgun.org [ MUST use this one and NOT yours ]
SMTP Host Port : 587
Use SSL/TLS : No [ important ]
SMTP Authentication Username : postmaster@yourdomain.com
SMTP Authentication Password : 2118870544b548867c2258f318fba6dd-9949a98f-201cc5b5 [ see in image below ]
Default Email From Address : etay@yourdomain.com
- Применяемые настройки базы данных ACL (вы можете использоватькод ниже - кредиты )
-- to be run as user SYS
-- to avoid ORA-30992 and ORA-01858 due to invalid date format when calling create_acl
alter session set nls_language = AMERICAN;
alter session set nls_territory = AMERICA;
BEGIN
DBMS_NETWORK_ACL_ADMIN.create_acl (
acl => 'apex.xml',
description => 'Access Control List for APEX',
principal => 'APEX_050000',
is_grant => TRUE,
privilege => 'connect',
start_date => SYSTIMESTAMP,
end_date => NULL);
COMMIT;
END;
/
-- for outgoing mail via local mail server
BEGIN
DBMS_NETWORK_ACL_ADMIN.assign_acl (
acl => 'apex.xml',
host => 'localhost',
lower_port => 25,
upper_port => 25);
COMMIT;
END;
/
-- for integration to PayPal (also requires Oracle Wallet with SSL certificate)
BEGIN
DBMS_NETWORK_ACL_ADMIN.assign_acl (
acl => 'apex.xml',
host => '*.paypal.com',
lower_port => 443,
upper_port => 443);
COMMIT;
END;
/
-- for integration with Amazon S3 (use port 443 if using SSL)
BEGIN
DBMS_NETWORK_ACL_ADMIN.assign_acl (
acl => 'apex.xml',
host => '*.amazonaws.com',
lower_port => 80,
upper_port => 80);
COMMIT;
END;
/
/*
-- add another user/schema to already existing ACL
BEGIN
DBMS_NETWORK_ACL_ADMIN.add_privilege (
acl => 'apex.xml',
principal => 'YOUR_SCHEMA_NAME',
is_grant => TRUE,
privilege => 'connect',
position => NULL,
start_date => NULL,
end_date => NULL);
COMMIT;
END;
/
*/
-- to verify settings:
select host, lower_port, upper_port, acl
from dba_network_acls;
select *
from dba_network_acl_privileges;
apex_mail.send(
p_to => 'MyGmailAccount@gmail.com' , -- change to your email address
p_from => 'etay@yourdomain.com', -- change to a real senders email address
p_body => 'test',
p_body_html => '<html><body>test</body></html>,
p_subj => 'test mailgun);