このファンクションは、電子メールにApplication Expressインスタンスへのリンクが含まれるときに、インスタンスのURLを取得します。
注意:
このファンクションでは、電子メールにインスタンス設定Application Express Instance URL
が設定されている必要があります。
構文
APEX_MAIL.GET_INSTANCE_URL return VARCHAR2;
パラメータ
なし
例
次の例では、アプリケーション100のページ10への絶対URLを含む、注文確認の電子メールを送信します。
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;
親トピック: APEX_MAIL