willa666
asked on
Retrieve forgotten Password
I want to create a page that the user inputs their emaill address and then the page will search a table called user for that emaill address and then email their password to their emaill address.
I am using classic ASP not .NET with a SQL backend.
Is their an extentsion that is avvalible or is it a hardcoding job?
willa
I am using classic ASP not .NET with a SQL backend.
Is their an extentsion that is avvalible or is it a hardcoding job?
willa
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
JI rockman
Thanks matey thank works a treat!
wila :)
Thanks matey thank works a treat!
wila :)
<%
If Request.ServerVariables("R
'get the text form emailaddress and saves it to a variable
var_emailaddress = request.form("emailaddress
'connect to your database
'then run this sql
SELECT emailaddress, password FROM users WHERE emailadress LIKE 'var_emailaddress'
'then you will have to find wheather the emailaddress is valid
'if so then set teh password to variables and send email
if (yourrecordsetname).Fields
var_password = (yourrecordsetname).Fields
Dim objMail
Dim strBody
Set objMail = Server.CreateObject("CDONT
objMail.From = "your email address"
objMail.Subject = "your password"
objMail.To = var_emailaddress
HTML = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">"
HTML = HTML & "<html>"
HTML = HTML & "<head>"
HTML = HTML & "<title>Sending Email</title>"
HTML = HTML & "</head>"
HTML = HTML & "<body bgcolor=""FFFFFF"">"
HTML = HTML & "<p align = ""center"">This email has been auto-generated; Please do not respond.</p>"
HTML = HTML & "</body>"
HTML = HTML & "</html>"
objMail.BodyFormat=0 '0= HTML, 1=Text
objMail.MailFormat=0
objMail.Body = HTML
objMail.Send
Response.write("Mail was Sent")
set objMail = nothing
'redirect to your password has been sent page ro something
Response.Redirect("passwor
'ends the valid email and sends email
end if
'emai wasnt valid
else
response.redirect("wrong_e
end if
this is a rough guidline and was written without testing, becasue I dont know how you are connecting the sql with asp, and the connection names would be a mess.
I hope this gets you in the right direction.
Rockman