33.5 GET_INSTANCE_URL Function
This function gets the instance URL if an email includes a link to an Oracle APEX instance
Note:
This function requires that the APEX Instance URL parameter is set on the Manage Instance, Instance Settings page in the Email section in Administration Services.Syntax
APEX_MAIL.GET_INSTANCE_URL return VARCHAR2;
Parameters
None.
Example
The following example sends an Order Confirmation email which includes an absolute URL to page 10 of application 100.
DECLARE
l_body clob;
l_body_html clob;
BEGIN
l_body := 'To view the content of this message, please use an HTML enabled mail client.' || utl_tcp.crlf;
l_body_html := '<html><body>' || utl_tcp.crlf ||
'<p>Please confirm your order on the <a href="' ||
apex_mail.get_instance_url || 'f?p=100:10">Order Confirmation</a> page.</p>' || utl_tcp.crlf ||
'</body></html>';
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_body_html => l_body_html,
p_subj => 'Order Confirmation' );
END;
See Also:
- Configuring Email in Oracle APEX Administration Guide
Parent topic: APEX_MAIL