<% Dim Email Dim Connect, RS, Query, Company_ID, OnNotes, Query2, direct, loginfile, OBJdbConnection, fileSys, OBJdbConnection2 Dim Logfile, drivepath, myfileobject, logoutfile, sIPAddress, shorttime, logintimes, login, RS2 Email = "" Login = "" Email = Trim(Request.Form("email")) Login = Trim(Request.Form("login")) CurrentDate = FormatDateTime(Date,2) Shorttime = FormatDateTime(Time,3) sIPAddress = Request.ServerVariables("HTTP_X_FORWARDED_FOR") If sIPAddress="" Then sIPAddress = Request.ServerVariables("REMOTE_ADDR") DSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("\db\access\access.mdb") & ";" DSN2 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("\db\access\access.mdb") & ";" Set OBJdbConnection = Server.CreateObject("ADODB.Connection") OBJdbConnection.Open(DSN) Query = "Select * from Passwords " & "Where Email = '"&Email&"'" Set RS = OBJdbConnection.Execute(Query) Drivepath=request.servervariables("APPL_PHYSICAL_PATH") Set MyFileObject=server.CreateObject("Scripting.fileSystemObject") Set logoutFile=myfileobject.openTextfile(drivepath + "\db\" + "Forgotpassfile" + ".txt",8,TRUE) logoutfile.WriteLine(login + ", " & CurrentDate & ", " & ShortTime & ", " & sIPAddress) Set OBJdbConnection2 = Server.CreateObject("ADODB.Connection") OBJdbConnection2.Open(DSN2) Query2 = "Select * from Passwords " & "Where UserID = '"&Login&"'" Set RS2 = OBJdbConnection.Execute(Query2) Drivepath=request.servervariables("APPL_PHYSICAL_PATH") Set MyFileObject=server.CreateObject("Scripting.fileSystemObject") Set logoutFile=myfileobject.openTextfile(drivepath + "\db\" + "Lookupemailfile" + ".txt",8,TRUE) logoutfile.WriteLine(login + ", " & CurrentDate & ", " & ShortTime & ", " & sIPAddress) Dim Link, hidden Link = Trim(Request("Link")) Hidden = Link %>

Please enter the email address of your AGTEK Support Contact

Email Address:
<% If Email <> "" then If Not RS.EOF Then Body = ("We received a request for your login and password to AGTEK technical support - www.agtek.com/support.html. Please use the following login and password:" & vbcrlf & vbcrlf) Body = (Body & "Login: " & (rs("userid") & vbcrlf & "Password: " & rs("Password") & vbcrlf & vbcrlf & "If you did not request this email, please disregard this message.")) logoutfile.WriteLine(rs("userid") & ", " & Email + ", " & CurrentDate & ", " & ShortTime & ", " & sIPAddress) Set Mail = CreateObject("CDO.Message") 'This section provides the configuration information for the remote SMTP server. 'Send the message using the network (SMTP over the network). Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="secure.emailsrvr.com" Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'Use SSL for the connection (True or False) 'Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60 'If your server requires outgoing authentication, uncomment the lines below and use a valid email address and password. 'Basic (clear-text) authentication 'Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 'Your UserID on the SMTP server Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") ="webmaster@agtek.com" Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") ="94551396!" Mail.Configuration.Fields.Update 'End of remote SMTP server configuration section Mail.Subject="AGTEK Support Information" Mail.From="webmaster@agtek.com" Mail.To= Email Mail.TextBody= Body On Error Resume Next Mail.Send if Err.Number = 0 then Response.Write "
Your AGTEK Support information has been emailed. Please check your inbox in a few minutes.
" else Response.Write ("

Mail send failure. Error was " & Err.description) Err.Clear end if set Mail=nothing Else Response.write("
Sorry, that email address does not exist or is not the designated AGTEK support contact.
") End if End if 'RS.Close 'Set RS = Nothing 'OBJdbConnection.Close 'Set OBJdbConnection = Nothing %>

If you do not know who your AGTEK Support Contact is, enter your login below

Login:
<% If login <> "" then If Not RS2.EOF Then logoutfile.WriteLine(rs("userid") & ", " & Email + ", " & CurrentDate & ", " & ShortTime & ", " & sIPAddress) UserID = rs2("Email") Response.Write ("
Your AGTEK Support Contact's email address is " & Userid & "
") Else Response.write("
Sorry, There is no AGTEK Support Contact for that Login" & "
") End if Response.write(userlogin) RS2.Close Set RS2 = Nothing OBJdbConnection2.Close Set OBJdbConnection2 = Nothing End if %> <% If Link <> "" then hidden= Link end if If Message1 <> "" then Response.write(message1) end if %>