<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Dim UsersRS__value UsersRS__value = "0" If (Request("Email") <> "") Then UsersRS__value = Request("Email") End If %> <% Dim UsersRS Dim UsersRS_numRows Set UsersRS = Server.CreateObject("ADODB.Recordset") UsersRS.ActiveConnection = MM_molds_STRING UsersRS.Source = "SELECT * FROM Customers WHERE CustomerEmail='" + Replace(UsersRS__value, "'", "''") + "'" UsersRS.CursorType = 0 UsersRS.CursorLocation = 2 UsersRS.LockType = 3 UsersRS.Open() UsersRS_numRows = 0 %> <% if Request("Selected") <> "" then UserEmail=Request("Email") if not UsersRS.eof then UserPassword=UsersRS("CustomerPassword") SendEmail Response.Redirect "forgotten_password.asp?success=true" else Response.Redirect "forgotten_password.asp?failed=true" end if end if function SendEmail Set objCDOMail = Server.CreateObject("CDONTS.NewMail") objCDOMail.From = "info@soapandcandlemolds.com" objCDOMail.To = UserEmail objCDOMail.Subject = "Password For Soap and candle molds.com Inc" objCDOMail.Body = mailbody objCDOMail.Send Set objCDOMail = Nothing end function function mailbody tmpstr="" Set objXML = Server.CreateObject("Microsoft.XMLDOM") objXML.validateOnParse=True objXML.load(Server.MapPath("xml/forgot_password.xml")) set objNodeXML=objXML.documentElement tmpstr=objNodeXML.selectSingleNode("body").Text Set objXML = Nothing tmpstr=replace(tmpstr,"#UserEmail#",UserEmail) tmpstr=replace(tmpstr,"#UserPassword#",UserPassword) mailbody=tmpstr end function %> Forgotten Password

Forgotten Password

<%if Request("success") = "" then%>

<%if Request("failed") <> "" then%> <%end if%>
Please enter your email address.
 
Your Email address is not in our database.
Your Email Address:
 
<%else%>

Thank you. Your password has been emailed to you.
<%end if%>
<% UsersRS.Close() Set UsersRS = Nothing %>