Retrieve forgotten Password

Posted on 2004-09-22
Last Modified: 2010-04-25
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?


Question by:willa666
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 10

Accepted Solution

rockmansattic earned 500 total points
ID: 12122144
Dont know of any extensions for DW that incorperates asp and SQL,
But this would not be that hard to do handcoding.

the mailer would have to be coded and it would look something like this:

If Request.ServerVariables("Request_Method") = "POST" then

Dim objMail
Dim strBody

 Set objMail = Server.CreateObject("CDONTS.NewMail")

    objMail.From    = Request.Form("appemailaddress")
    objMail.Subject = "New Application Request"
    objMail.To      = request.form("emailaddress")

     firstName             = Request.Form("fName")
     Lastname             = Request.Form("lname")
     emailaddress      = Request.Form("emailaddress")

     HTML = HTML & "<html>"
     HTML = HTML & "<head>"
     HTML = HTML & "<title>Sending CDONTS Email Using HTML</title>"
     HTML = HTML & "</head>"
     HTML = HTML & "<body bgcolor=""FFFFFF"">"
     HTML = HTML & "<font size =""2"" face=""Arial"">"
     HTML = HTML & "<b>" & firstName & vbCrLf & lastname& vbCrLf & " has submitted an application ." & "<br>"
       HTML = HTML & "It was submitted " & submitted & vbCrLf & "</b>" & "<br>" & "<br>"
     HTML = HTML & "</font>"
       HTML = HTML & "Email Address: " & emailaddress & "<br>"      
       HTML = HTML & "Phone Number: " & phone & "<br>"              
       HTML = HTML & "<font size =""3"">"
       HTML = HTML & "Address" & "<br>" & "</font>"
       HTML = HTML & "<hr width=""200"" size=""2"" align=""left"">"
       HTML = HTML & address & "<br>"
       HTML = HTML & city & ", " & appstate & vbCrLf & zip & "<br>" & "<br>"
       HTML = HTML & "Education: " & education & "<br>"
       HTML = HTML & "College: " & college & "<br>"
       HTML = HTML & "Graduation Date: " & graddate & "<br>"      
       HTML = HTML & "Degree: " & degree & "<br>"      
       HTML = HTML & "Date of Birth: " & dob & "<br>"              
       HTML = HTML & "Comments: " & comments & "<br>"
     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.Body = HTML

Response.write("Mail was Sent")

'You must always do this with CDONTS.
 set objMail = nothing

End If

once to have connected the sql and asp, the login would be too hard, there are tons of resources online,


LVL 10

Expert Comment

ID: 12122291
The way I would tackel it via hand codeing would be somthing like this:

If Request.ServerVariables("Request_Method") = "POST" then

'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.item("emailaddress").Value <> "" then

var_password = (yourrecordsetname).Fields.item("password").Value

Dim objMail
Dim strBody

 Set objMail = Server.CreateObject("CDONTS.NewMail")

    objMail.From    = "your email address"
    objMail.Subject = "your password"
    objMail.To      = var_emailaddress


     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.Body = HTML

Response.write("Mail was Sent")

 set objMail = nothing

'redirect to your password has been sent page ro something

'ends the valid email and sends email
end if

'emai wasnt valid

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.



Author Comment

ID: 12154305
JI rockman

Thanks matey thank works a treat!

wila :)

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
dreamweaver cs6 keep getting error 2 msg 16 397
Request.Querystring with Cookie 5 314
Download all files with one click 7 610
Setting up PHP server 3 217
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question