Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

APEX 24.1: Use different approved senders email addresses for prod, dev, etc. environments

Miguel EscamillaSep 19 2024 — edited Sep 20 2024

Is Oracle Apex 24.1 “Application Settings” the right way to accomplish this?

We need to use different sender emails based on the environment(dev, testing, prod, etc) the application is running on. We want to be able to set the value for this when we install the application.

We use APEX_MAIL. Below is an example from the docs that we use in our application. p_from is the value that needs to be dynamic based on the env it is running on.

-- Example One: Plain Text only message 
DECLARE 
l_body CLOB; 
BEGIN 
l_body := 'Thank you for your interest in the APEX_MAIL 
package.'||utl_tcp.crlf||utl_tcp.crlf; 
l_body := l_body ||' Sincerely,'||utl_tcp.crlf; 
l_body := l_body ||' The APEX Dev Team'||utl_tcp.crlf; 
apex_mail.send( 
p_to => 'some_user@somewhere.com', -- change to your email address 
p_from => 'some_sender@somewhere.com', -- change to a real senders email address 
p_body => l_body, 
p_subj => 'APEX_MAIL Package - Plain Text message'); 
END; 
/

If “Application Settings” is not the way to go, let me know how you implement this.

Thanks in advance!

This post has been answered by alacourb on Oct 22 2024
Jump to Answer

Comments

Post Details

Added on Sep 19 2024
1 comment
204 views