Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Send "Forgot password" reminder via email

Reply
Thread Tools

Send "Forgot password" reminder via email

 
 
groupie
Guest
Posts: n/a
 
      12-30-2007
Hi,
I'd like to know how to implement the "Forgot Password" feature on
many websites which require a login, exactly like this ebay example:
http://cgi4.ebay.com/ws/eBayISAPI.dl...RecognizerShow

I've already retrieved the users password from the database - I just
need to send it to the email address entered.

From reading many posts, I need a server-side script and rather not
use form mailto: nor use javascript on the users PC.

Any help/pointers appreciated.
 
Reply With Quote
 
 
 
 
Anthony Jones
Guest
Posts: n/a
 
      12-30-2007

"groupie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
> I'd like to know how to implement the "Forgot Password" feature on
> many websites which require a login, exactly like this ebay example:
> http://cgi4.ebay.com/ws/eBayISAPI.dl...RecognizerShow
>
> I've already retrieved the users password from the database - I just
> need to send it to the email address entered.
>
> From reading many posts, I need a server-side script and rather not
> use form mailto: nor use javascript on the users PC.
>
> Any help/pointers appreciated.


You are right you would never want any response going back to the client
that contained the password.

The email address should have been registered and verified as part of the
account set up and therefore held in the DB already. The email address that
you send should only be the one verified for the user account. Thus no one
can impersonate a UserID and have the password sent to a different email
address.

Having pulled the email address and password from the DB you can use the
following to send an email:-

Sub SendPassword(rsEmail, rsPassword)

Dim oMsg : Set oMsg = Server.CreateObject("CDO.Message")

oMsg.To = rsEmail
oMsg.Subject = "Your password"
oMsg.HTMLBody = "<html><body>" & rsPassword & "</body></html>"
Set oMsg.Configuration = GetConfig() 'delete if server already configured

oMsg.Send

End Sub

Function GetConfig()

Set GetConfig = Server.CreateObject("CDO.Configuration")

With GetConfig.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"yourserver"
.Update
End With

End Function

Note that in GetConfig you need to replace "yourserver" with an SMTP server
name that your Web server can use to send email. Alternative your site may
be configured via IIS manager with these values, in which case you can
delete the GetConfig stuff altogether.


--
Anthony Jones - MVP ASP/ASP.NET


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How to send a reminder via email in outlook 2010 Desk Rabbit Computer Support 0 12-22-2010 09:52 AM
Re: How to send a reminder via email in outlook 2010 MyNews Computer Support 1 12-22-2010 06:16 AM
Any free website to send email reminder at specific time? lbbss Computer Support 2 07-23-2007 03:27 AM
Send a Reminder Mariame ASP .Net 3 10-14-2004 04:16 PM
[SU] SEND IN YOUR PHOTOS (Weekly Reminder) Double D Digital Photography 0 12-11-2003 02:22 AM



Advertisments