<%@ Language=VBScript%> <% dim strpagecode strpagecode= "5UREG12" %> <% 'Page/form name:5.6_forgotpwd.asp 'Purpose:User interface for updating the password 'Date Modified:12-07-2001 'Author:John De Britto %> <% dim STR_MSG,strFlag,strLoginName,strEmail,strSQL,strPassword dim strEmailMsg if Request.Form("strFlag")="Y" then strFlag=Request.Form("strFlag") strLoginName=trim(Request.Form("loginname")) strEmail=trim(Request.Form("email")) strSQL="select firstname,userpassword from UserMaster where loginid='"& strLoginName &"' and email='"& strEmail &"'" set rstTemp=server.CreateObject("Adodb.recordset") rstTemp.Open strSQL,objConn if not (rstTemp.BOF or rstTemp.EOF) then 'first create the asp Object 'set objBase64 = server.CreateObject("aneibase64.class1") ' result will now be set to the decoded string 'strPassword = objBase64.base64decode(rstTemp("userpassword")) strPassword = rstTemp("userpassword") 'response.write("
Decoded String: " & strPassword) 'Response.End strEmailMsg= "Dear " & rstTemp("firstname") & "," & chr(13) & chr(13) & "Your Password is '"& strPassword &"'." & chr(13) & chr(13) & "Regards." & chr(13) & chr(13) & "ITPO Administrator" set rsmail=server.CreateObject("ADODB.Recordset") rsmail.ActiveConnection=objConn rsmail.CursorType=1 rsmail.Open "select * from parameter where parametercode='MSI' " set Mailer=server.CreateObject("SoftArtisans.SMTPMail") '--- Create an instance of the SA-SMTPmail object Mailer.FromName = Application("adminname") Mailer.FromAddress =Application("adminemail") Mailer.RemoteHost = rsmail.Fields(2) '--- Set the Remote Host (SMTP) Host that we'll send this mail thru. Mailer.addrecipient "'" & rstTemp("firstname") & "'",strEmail '--- Add the recipient who will receive the email. Mailer.Subject = "Password Request" '--- Sets Subject line for the message Mailer.Bodytext = strEmailMsg '--- Body of text Mailer.RemoteHost = rsmail.Fields(2) '--- Set the Remote Host (SMTP) Host that we'll send this mail thru. '--- Sends the message and can be used to verify if there if it has been sent. 'Mailer.SendMail if Mailer.SendMail then else Response.Write mailer.sendmail Response.Write "
Error:" & err.number & " " & err.source Response.Write "
Desc:" & err.description 'Response.end set mailer = nothing Response.Write "Check your mail server or TCP/IP connection" Response.Redirect "/inc/commoninc/error.asp?section="&server.urlencode("Forgot Password")&"&errorno=F03" 'Response.End end if set Mailer = nothing rsmail.Close set rsmail=nothing STR_MSG="An Email containing your Password has been sent to your Email Id: " & strEmail else STR_MSG="Login Name or E-mail is not correct. Try again." end if else end if %> Forgot Password - <%=application("Title")%> <%if strflag<>"Y" then%> <%else%> <%end if%>
Home >Forgot Password
Forgot Password
<% if strFlag<>"Y" then %> <% else %> <% end if%>
Login Name
*
E-mail
*
<%=STR_MSG%>
<%if strFlag<>"Y" then %>

* Marked fields are mandatory   

<% else %>
<% end if%>