Sign In Verification in oracle apex application | Apex Application SignI...





Send email:
-----------------



declare

l_body_html CLOB;

v_name nvarchar2 (50);

v_code  nvarchar2 (50);

v_email nvarchar2(50);

begin

select EMAIL, PASSWORD_RECOVERY_CODE into v_email,v_code from COMMON_USER

where id= :P19_ID;

l_body_html := '

<html lang="en-US">

         <head>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">

         </head>

                <body>

<div style="height:300px; width: 800px;border: 1px solid rgb(167, 162, 162);box-shadow: 2px 2px 5px 2px rgb(216, 204, 203);">

          <div style="background:#244283; height: 40px; width: 800px;color:#fff; ">

<h2 style="margin-left:20px; margin-top: 0px; padding-top: 10px;">Account Verification Email</h2>

</div>

<div style="height: 45px;margin: 20px;" >

<p>

                    Thank you for registration.

                   

                    <br>

To verify your account please click the link below.</p>

<p><a href="https://apex.oracle.com/pls/apex/sanjaysikder/r/email-campaining/account-verification?P20_EMAIL='||v_email||'">Verify Your account</a></p><br>

</div>

</div>

</body>

</html>

';

APEX_MAIL.SEND(:P19_EMAIL,'no-reply@oraclelearner.com',l_body_html,l_body_html,'Account Verification Email',null,null,null);

exception when others then null;

end;




Account Verification Code:
---------------------------------------



declare

v_email nvarchar2(50);

begin

select EMAIL into v_email  from COMMON_USER where EMAIL = :P20_EMAIL;

if v_email is not null then

update COMMON_USER set IS_VERIFIED='V' where EMAIL = :P20_EMAIL;


htp.p('

      <style>

      .class1

      {

       text-align:center;

      }

      </style>
 <div style = "text-align:center;">

          <h4>

               Congratulation, Your account verification is done.</br>

                 <a href="https://apex.oracle.com/pls/apex/sanjaysikder/r/email-campaining/login">click</a> here to log in.
    </h4>

      </div>

      ');

      else

      htp.p('

            <style>

      .class2

      {

       text-align:center;

      }

      </style>

      <div class="class2">

          <p>

               Sorry, There is something went wrong.</br>

                 Please <a href="f?p=&APP_ID.:4">click</a> here for Registration again after 30min.

     

          </p>

      </div>

      ');

      end if;

      exception when others then null;

end;





Login Page Validation Code:

declare
v_verification nvarchar2(10);
begin
select IS_VERIFIED into v_verification from COMMON_USER where EMAIL= :P9999_USERNAME;
if v_verification is null then
raise_application_error (-20343, 'Your Email is not Verified. Please varify your Email or  register again.');
else null;
end if;
end;








Comments

  1. Thank you very much for uploading the videos. I am your regular follower. I am benefiting from watching your videos. Can I get the code?
    01819744718

    ReplyDelete

Post a Comment