Solved

Retrieve forgotten Password

Posted on 2004-09-22
3
187 Views
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?

willa

0
Comment
Question by:willa666
[X]
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
3 Comments
 
LVL 10

Accepted Solution

by:
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 = "<!DOCTYPE HTML PUBLIC""-//IETF//DTD HTML//EN"">"
     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.MailFormat=0


     objMail.Body = HTML
    objMail.Send

Response.write("Mail was Sent")

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


End If

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

Rockman

0
 
LVL 10

Expert Comment

by:rockmansattic
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 = "<!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("password_sent")

'ends the valid email and sends email
end if

'emai wasnt valid
else
  response.redirect("wrong_email.html")

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





0
 
LVL 1

Author Comment

by:willa666
ID: 12154305
JI rockman

Thanks matey thank works a treat!

wila :)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
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 …
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

728 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