<% Option Explicit %> <% '**************************************************************************************** '** Copyright Notice '** '** Web Wiz Guide - Web Wiz Mailing List '** '** Copyright 2001-2005 Bruce Corkhill All Rights Reserved. '** '** This program is free software; you can modify (at your own risk) any part of it '** under the terms of the License that accompanies this software and use it both '** privately and commercially. '** '** All copyright notices must remain in tacked in the scripts and the '** outputted HTML. '** '** You may use parts of this program in your own private work, but you may NOT '** redistribute, repackage, or sell the whole or any part of this program even '** if it is modified or reverse engineered in whole or in part without express '** permission from the author. '** '** You may not pass the whole or any part of this application off as your own work. '** '** All links to Web Wiz Guide and powered by logo's must remain unchanged and in place '** and must remain visible when the pages are viewed unless permission is first granted '** by the copyright holder. '** '** This program is distributed in the hope that it will be useful, '** but WITHOUT ANY WARRANTY; without even the implied warranty of '** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER '** WARRANTIES WHETHER EXPRESSED OR IMPLIED. '** '** You should have received a copy of the License along with this program; '** if not, write to:- Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom. '** '** '** No official support is available for this program but you may post support questions at: - '** http://www.webwizguide.info/forum '** '** Support questions are NOT answered by e-mail ever! '** '** For correspondence or non support questions contact: - '** info@webwizguide.info '** '** or at: - '** '** Web Wiz Guide, PO Box 4982, Bournemouth, BH8 8XP, United Kingdom '** '**************************************************************************************** 'Set the response buffer to true as we maybe redirecting Response.Buffer = True 'Declare variables Dim strUserName 'Holds the users username Dim strEmail 'Holds the users email Dim strPassword 'Holds the password Dim strEncryptedPass 'Holds the encrypted password Dim strSaltValue 'Holds the salt value for the password Dim blnEmailFound 'Set to false if the email is not found Dim blnNewPassCreated 'Set to true if a new password is created Dim strSubject 'Holds the email subject Dim strEmailBody 'Holds the body of the email blnEmailFound = true blnNewPassCreated =false 'Get the users email strEmail = characterStrip(Trim(Mid(LCase(Request.QueryString("email")), 1, 50))) 'If this is a post back then log the user in If Request.Form("postBack") Then 'Read in the form details strEmail = characterStrip(Request.Form("email")) 'Get the details from the database strSQL = "SELECT " & strDbTable & "Members.* " & _ "FROM " & strDbTable & "Members " & _ "WHERE " & strDbTable & "Members.Email = '" & strEmail & "';" With rsCommon 'Set the cursor type property of the record set to Dynamic so we can navigate through the record set .CursorType = 2 'Set the Lock Type for the records so that the record set is only locked when it is updated .LockType = 3 'Query the database .Open strSQL, adoCon 'If there is a record returned then create new password If NOT .EOF Then 'Get the name of the user strUserName = .Fields("Name") 'Create a new password strPassword = hexValue(7) 'Encrypt the new password If blnEncryptPasswords Then 'generate a salt value strSaltValue = hexValue(Len(strPassword)) 'Encrypt the new password strEncryptedPass = HashEncode(strPassword & strSaltValue) 'Don't encrypt password Else 'Place the unencrypted pass into the encrypt variable strEncryptedPass = strPassword End If 'Update the password in the database .Fields("Password") = strEncryptedPass If blnEncryptPasswords Then .Fields("Salt") = strSaltValue 'Update the database .Update 'Send an email with the new password 'Set the subject of the email strSubject = strWebsiteName & ": " & strTxtMailingList & " " & strTxtNewPasswordRequest 'set the message body of the activation email strEmailBody = strTxtHi & " " & strUserName & "," & _ vbCrLf & vbCrLf & strTxtGreetingsFrom & " " & strWebsiteName & "." & _ vbCrLf & vbCrLf & strTxtWeReceivedYourRequestForANewPassswordForTheMailingListOn & " " & strWebsiteName & "." & _ vbCrLf & vbCrLf & strTxtYourNewPasswordIs & ":-" & _ vbCrLf & vbCrLf & vbTab & strPassword & _ vbCrLf & vbCrLf & strTxtToLoginIntoYourMailingListAccountClickOnTheAddressBelow & ":-" & _ vbCrLf & vbCrLf & strWebsiteAddress & "/default.asp?email=" & strEmail & _ vbCrLf & vbCrLf & strSignature 'Create email object Call createMailObject(strMailComponent) '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** 'Write a remove from mailing list message to add to the end of the e-mail in HTML Format strEmailBody = strEmailBody & mailBody("text", strEmail, blnLCode) '- This needs to stay in place for the software to stay legal in most countries '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** 'Send the email Call SendMail(strUserName, strEmail, strMailComponent, "text") 'Drop email component Call dropMailObject(strMailComponent) 'Set the new password created variable to true blnNewPassCreated = true 'Else the email is incorrect Else blnEmailFound = false End If End With End If 'Reset server objects Set rsCommon = Nothing adoCon.Close Set adoCon = Nothing %> Mailing List: Forgot Password
<% = strWebsiteName & "'s " & strTxtMailingList & " " & strTxtForgottenPassword %>
<% 'If there is a problem tell the user If blnEmailFound = false Then %>

<% = strTxtTheEmailAddressEnteredCouldNotBeFound %>.
<% = strTxtPleaseConfirmTheEmailAddressYouEnteredOrClick %> <% = strTxtClickhere %> <% = strTxtToSignupAsANewMember %>.
<% End If %>
<% = strWebsiteName & " " & strTxtMailingList & " " & strTxtNewPasswordRequest %>


<% 'if a new password has bene sent then tell the user If blnNewPassCreated Then %> <% = strTxtANewPasswordHasBeenEmailedToYou %>.

<% = strTxtPleaseCheckYourEmailInboxForAMessageWithTheSubjectLine %>: "<% = strTxtMailingList & " " & strTxtNewPasswordRequest %>".

<% Else %> <% = strTxtPleasEnterYourEmailAddressYouUseForTheMailingListToRequestPassword %>.

<% = strTxtEmailAddress %>
 

<% End If %> <% = strTxtReturnToLogin %>


<% Response.Write("

") '***** START WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** If blnLCode = True Then Response.Write("Powered by Web Wiz Mailing List version " & strVersion & "") Response.Write("
Copyright ©2001-2005 Web Wiz Guide") End If '***** END WARNING - REMOVAL OR MODIFICATION OF THIS CODE WILL VIOLATE THE LICENSE AGREEMENT ****** %>