<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% Dim userRecord__MMColParam userRecord__MMColParam = "1" If (Request.QueryString("eMail") <> "") Then userRecord__MMColParam = Request.QueryString("eMail") End If %> <% Dim userRecord Dim userRecord_cmd Dim userRecord_numRows Set userRecord_cmd = Server.CreateObject ("ADODB.Command") userRecord_cmd.ActiveConnection = MM_trevs_STRING userRecord_cmd.CommandText = "SELECT * FROM users WHERE uEmail = ?" userRecord_cmd.Prepared = true userRecord_cmd.Parameters.Append userRecord_cmd.CreateParameter("param1", 200, 1, 50, userRecord__MMColParam) ' adVarChar Set userRecord = userRecord_cmd.Execute userRecord_numRows = 0 %> Rhydd Covert Remind Me


Rhydd Activity Tracking System
Login? Remind Me
<%If Len(Request.QueryString("Submit"))=0 AND Len(Request.QueryString("eMail"))=0 then%>


RATS can send you your login details if it already has your current email address.

Simply type your email address registered with RATS into the form below.
RATS will then deliver the reminder to that email address within minutes.
Please ensure emails from rhyddcovert.org.uk pass your spam check programme.

If no email address is registered, please contact the Warden or Bookings Manager.

email Address:
with RATS
 
 



<%else ' Here if Data has been passed from the 'Remind Me' form %> <% If Not(userRecord.EOF) then ' Records have been found for the email address given userRecord.MoveNext If userRecord.EOF then ' Only one single User record exists for the email given so send details. userRecord.MoveFirst ' This will be the one and only record ' ================================================================================================ 'Set up email ready to call subroutine to send it. (email account detials set in Subroutine) Dim TB_To, TB_Subject, TB_Body, TBReply TB_To = (userRecord.Fields.Item("uEmail").Value) ' Address to send email to. TB_Subject = "Rhydd Covert - Your RATS account details" ' Subject line of address. TB_Reply = "bookings@rhyddcovert.org.uk" ' Address that replies should be sent to. ' Set up body header for email html content -------------------------------------------- TB_Body = emailStart() ' Set up main body content for email HTML ------------------------------------------------ TB_Body = TB_Body & "

Rhydd Covert - User Account Details

" TB_Body = TB_Body & "

Users Full Name: "&(userRecord.Fields.Item("uFullname").Value)&"
" TB_Body = TB_Body & "Display Name: "&(userRecord.Fields.Item("uPrefName").Value)&"

" TB_Body = TB_Body & "Logon Username: "&(userRecord.Fields.Item("uName").Value)&"
" TB_Body = TB_Body & "Logon Password: "&(userRecord.Fields.Item("uPW").Value)&"

" TB_Body = TB_Body & "

You have received this email because someone has requested that we send you" TB_Body = TB_Body & " your account details for the Rhydd Covert RATS booking system.

" TB_Body = TB_Body & Date() & "
" ' Set up body footer for email html content -------------------------------------------- TB_Body = TB_Body & emailFinish() Call sendMail(TB_To,TB_Subject,TB_Body,TB_Reply) ' Send the email Response.Write("
An email has been sent to your registered email address.

") Response.Write((userRecord.Fields.Item("uEmail").Value) & "

") Response.Write("Normally this will be delivered within a few minute, but can take much longer.

") Response.Write("Please ensure that any SPAM filters or SPAM software you have will allow emails sent
") Response.Write("from @rhyddcovert.org.uk through to be delivered to your in box.

") Response.Write("If you still have not received it please check your SPAM email folders.

") Response.Write("Many Thanks.
" & Date() & "
") ' ================================================================================================ else ' More than one User record exist for the email given Response.Write("We have found more than one User Account with the email address You have given.
") Response.Write("Because of this we are unable to identify which account is your User Account.
") Response.Write("For further assistance contact the Rhydd Manager (Warden) or Bookings Manager
") Response.Write("Many Thanks.
") end If else ' No User records were found for the email address provided Response.Write("Sorry we cannot find any User Accounts with the email address you have given.
") Response.Write("Please click your back button and check you have entered it correctly.
") Response.Write("If this does not help, please contact the Booking Manager or Warden for assistance
") end IF end If %>

 

<% userRecord.Close() Set userRecord = Nothing %> <% '============================================================================================== Sub sendMail(ByVal mTo, ByVal mSubject, ByVal mBody,ByVal mReply) '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'Set the credentials for your email account to send the email from username="secure-1@rhyddcovert.org.uk" 'Insert your email account username between the quotes password="Rhydd2010" 'Insert your email account password between the quotes mFrom = "secure-1@rhyddcovert.org.uk" 'Insert the email address you wish to send from 'DO NOT CHANGE ANY SCRIPT CODE BELOW THIS LINE. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'Create a CDO.Configuration object Set objCdoCfg = Server.CreateObject("CDO.Configuration") 'Configure the settings needed to send an email objCdoCfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="intmail.atlas.pipex.net" objCdoCfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objCdoCfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objCdoCfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 objCdoCfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = username objCdoCfg.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = password objCdoCfg.Fields.Update 'Create the email that we are going to send Set objCdoMessage = Server.CreateObject("CDO.Message") Set objCdoMessage.Configuration = objCdoCfg objCdoMessage.From = mFrom objCdoMessage.To = mTo objCdoMessage.Subject = mSubject objCdoMessage.replyto = mReply 'Add the email body text objCdoMessage.HTMLBody = mBody On Error Resume Next 'Send the email objCdoMessage.Send 'Dispose of the objects after we have used them Set objCdoMessage = Nothing Set objCdoCfg = Nothing Set FSO = nothing Set TextStream = Nothing End Sub '==================================================================================================== %> <% ' Returns RATS HTML top of page etc. Place content after this - Use with Function emailFinish Function emailStart() emailStart = "" emailStart = emailStart & "" emailStart = emailStart & "Rhydd Covert" emailStart = emailStart & "
 Rhydd Activity" emailStart = emailStart & " Tracking System
" End Function '==================================================================================================== %> <% ' Returns RATS HTML bottom of page etc. Place after contents of message - Use with Function emailStart Function emailFinish() emailFinish="

 

" End Function '==================================================================================================== %>