• Post Reply Bookmark Topic Watch Topic
  • New Topic

Lost Password Script  RSS feed

 
Brian Mulvany
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am trying to add extra functionality to our website where we can email users their passwords and other user details if they forget them.
I want the user to be able to type in their email address and then after we check that they are a valid member in our database to email them their password.
I am using a MySQL database and JSP as you probably guessed.
If anybody knows where I can get a script to provide this funcionality I would really appreciate it.
Thanks
Brian Mulvany
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Takes about 10 minutes to write, maybe 20 if you've never used Javamail.

See it as a good exercise in Java/JSP.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66158
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As you know, no one here is going to write your code for you, but you'll get lots of help writing your own. What part has you flumoxed? The JavaMail? The DB access?

But to tell you the truth, I wouldn't do it this way at all. E-mail is not a secure protocol and sending clear-text passwords via e-mail is not very security conscious.

I've seen a number of different tactics employed for forgotten passwords, including off the top of my head:

  • Allow the user to set a string that serves as a password reminder.
  • Have the user set up a challenge and answer, which, if they answer the challenge correctly, allows them to reset their password.
  • Others that I can't think of pre-caffeine...

  •  
    Brian Mulvany
    Greenhorn
    Posts: 28
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi
    Thanks for that help.
    Does anybody know a good place to go on getting a tutorial on using JavaMail with MySQL.
    Thanks
    Brian Mulvany
     
    Bear Bibeault
    Author and ninkuma
    Marshal
    Posts: 66158
    146
    IntelliJ IDE Java jQuery Mac Mac OS X
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    JavaMail has nothing to do with MySQL or any DB. You would use JDBC to communicate with the DB, and JavaMail to format and send mail messages.

    We have a JDBC forum, and JavaMail is discussed in the Other APIs fourm. Those might be a good place to start.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!