Apex Mail To Send A e Mail HTML Format Link in Apex
Apex Mail To Send A e Mail HTML Format Link in Apex
Today i am going to write a blog about sending email and HTML support message in Oracle Application Express (APEX). In APEX 5, Sending a e-mail feature is
made it as very easily. Let's go through the below steps will step by step help your sending emails (APEX_MAIL) to public user.
In Oracle Application Express will make life easily to send mail to user by you can use the APEX_MAIL package to send an email from an APEX. This package is
built on top of the Oracle supplied UTL_SMTP package. By default this dependence, the UTL_SMTP package already be installed and functioning in APEX in
order to that you can use APEX_MAIL option to send mail by simply.
Create a one page in APEX (My case : page no is '5') and add button in this page (my case : named as p5_Send_Mail). The following steps will help your for send
a plain text email message from an application.
DECLARE
l_id number;
BEGIN
l_id := APEX_MAIL.SEND(
p_to => '[email protected]',
p_from => '[email protected]',
p_subj => 'Type your subject of the mail',
p_body => 'Type body od the message');
END;
4. In the Success Message field, enter: Mail Sent Successfully.
5. In the Failure Message field, enter: Error Sending Mail.
6. From the When Button Pressed list, select your button name (In my case: p5_Send_Mail). This is the send mail button that Placed in your page for processes
conditional.
7. Make Save Option and Run your Application.
You should now receive mail from this application and check your e-mail by 2 mins later or sometimes mail receive in Spam.
The following steps will help your for send a HTML format of email message from an application.
To create a PL/SQL procedure to send a HTML e-mail to the your public user:
DECLARE
l_id number;
l_body varchar2(1000);
l_from varchar2(50);
l_subject varchar2(100);
v_body_temp varchar2(10000);
BEGIN
l_from:='[email protected]';
l_subject:='Confirm your Availability for your Online Exam';
l_body := 'Reports.'||utl_tcp.crlf;
v_body_temp := '
<html>
<body>
<p>
Hi,<br>Click the below link to Confirm your Readiness for the Online Exam..!<br>
<a href="https://apex.oracle.com/pls/apex/f?p=27267:20">Click here to Confirm<a><br><b>Regards</b><br>
Exam Center.
</p>
</body>
</html>';
l_id := APEX_MAIL.SEND(
p_to => '[email protected]',
p_from => l_from,
p_body => l_body,
p_body_html => v_body_temp,
p_subj => l_subject);
END;
If you like this Blog and feel my guides useful, please share my page. Thanks! Cheers!