<%
if(request.getMethod().equals("POST"))
{
if(!(request.getParameter("username").equals("")))
{
valid=forgotpassword.validateusername(request.getParameter("username"));
}
else if(!(request.getParameter("email").equals("")))
{
valid=forgotpassword.validateemail(request.getParameter("email"));
}
if(valid)
{
forgotpassword.generate();
sendmail.setTo(forgotpassword.getEmail());
sendmail.setFrom("admin@pinctada.com");
sendmail.setMessage("");
sendmail.setFirstname(forgotpassword.getFirstname());
sendmail.setUsername(forgotpassword.getUsername());
sendmail.setPassword(forgotpassword.getPassword());
sendmail.setSubject("Your Username and password from pinctada");
sendmail.sendMail();
forgotpassword.encryptPassword();
%>
The newly generated
password has been sent to your mailbox,Login
back from here...
<%}else
{%>
The supplied username/email
is not valid, please try again...
<%}%>
<%}else
{%>
|
<%}%>
|