How to Send mail from Oracle APEX
1 : add configuration of mail server
BEGIN
-- Look for the ACL currently assigned to '*' and give APEX_190100
-- the "connect" privilege if APEX_190100
-- does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE (ACL_PATH,'APEX_190100','connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,'APEX_190100', TRUE, 'connect');
END IF;
EXCEPTION
-- When no ACL has been assigned to '*'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
'ACL that lets power users to connect to everywhere',
'APEX_190100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;
BEGIN
DBMS_NETWORK_ACL_ADMIN.add_privilege (
acl => 'power_users.xml',
principal => 'STOCK',
is_grant => TRUE,
privilege => 'connect');
COMMIT;
END;
/
Like Video
https://www.youtube.com/watch?v=2mARJbeo7to
thanks
1 : add configuration of mail server
Host:smtp.mailtrap.io
Port:25 or 465 or 587 or 2525
Username:
Password:
like Video
2: Enabling Network Service
DECLARE
ACL_PATH VARCHAR2(4000);BEGIN
-- Look for the ACL currently assigned to '*' and give APEX_190100
-- the "connect" privilege if APEX_190100
-- does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE (ACL_PATH,'APEX_190100','connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,'APEX_190100', TRUE, 'connect');
END IF;
EXCEPTION
-- When no ACL has been assigned to '*'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
'ACL that lets power users to connect to everywhere',
'APEX_190100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;
BEGIN
DBMS_NETWORK_ACL_ADMIN.add_privilege (
acl => 'power_users.xml',
principal => 'STOCK',
is_grant => TRUE,
privilege => 'connect');
COMMIT;
END;
/
Like Video
https://www.youtube.com/watch?v=2mARJbeo7to
thanks
When I try To Configure GMAIL With The Same Steps But With Gmail Elements I Got This Error
ردحذفORA-29024: Certificate validation failure
What Can I do ?
it is related to You email
حذفserver
try
حذفhttps://www.youtube.com/watch?v=cEWAwqhuL8k
https://icurly.net/2019/07/12/how-to-send-emails-from-apex-to-an-external-source-using-gmails-smtp/
حذفGmail Elements
ردحذفSMTP server: smtp.gmail.com
SMTP username: Your full Gmail address, such as youremail@gmail.com
SMTP password: Your Gmail password.
SMTP port: 465 (SSL)/587 (TLS)
TLS/SSL: Required.
Any Idea How Can I Sole This Error
ردحذفORA-29024: Certificate validation failure
https://icurly.net/2019/07/12/how-to-send-emails-from-apex-to-an-external-source-using-gmails-smtp/
ردحذف