%@ LANGUAGE="VBSCRIPT" %>
Pittsburgh Upholstery
Email Me My Password
<%
If Request("Action") <> "SendPassword" Then
%>
If you have forgotten your password the
website can email it to the email account that you have on file.
If you don't know your username or don't have an email on file then you will have to contact the
site administrator.
|
<%
Else
USERNAMECHECK = CStr(Replace(Request("USERNAME"),"'","''"))
Set ConnPasswords = Server.CreateObject("ADODB.Connection")
Set CmdCheckForExisting = Server.CreateObject("ADODB.Recordset")
ConnPasswords.Open ConnectionString
SQL = "SELECT USERS.* FROM USERS WHERE (USERNAME LIKE '%" & USERNAMECHECK & "%')"
CmdCheckForExisting.Open SQL, ConnPasswords, 1, 3
If CmdCheckForExisting.EOF Then
%>
This username does not exist.
Press back on your web browser and try again.
<%
Response.End
End IF
%>
<%
If CmdCheckForExisting("EMAIL") <> "" Then
If CDONTS_Installed = true Then
CDONTS_strBody = CDONTS_strBody & "FORM submitted at " & Now() & vbCrLf & vbCrLf
CDONTS_strBody = CDONTS_strBody & "This is your password as requested." & vbCrLf & vbCrLf
CDONTS_strBody = CDONTS_strBody & CmdCheckForExisting("PASSWORD") & vbCrLf
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.To = CmdCheckForExisting("EMAIL")
objCDO.From = EmailNotification
objCDO.Subject = "Password Request from the Advanced Password System"
objCDO.Body = CDONTS_strBody
objCDO.Send
Set objCDO = Nothing
End If
If SASMTPMAIL_Installed = true Then
SASMTPMAIL_strBody = SASMTPMAIL_strBody & "FORM submitted at " & Now() & vbCrLf & vbCrLf
SASMTPMAIL_strBody = SASMTPMAIL_strBody & "
This is your password as requested." & vbCrLf & vbCrLf
SASMTPMAIL_strBody = SASMTPMAIL_strBody & vbCrLf & "
" & CmdCheckForExisting("PASSWORD") & vbCrLf
Set Mailer = Server.CreateObject("SoftArtisans.SMTPMail")
Mailer.FromName = EmailNotification
Mailer.FromAddress = EmailNotification
mailer.addrecipient CmdCheckForExisting("FIRST_NAME") & " " & CmdCheckForExisting("LAST_NAME"), CmdCheckForExisting("EMAIL")
Mailer.bodytext = SASMTPMAIL_strBody
mailer.contenttype = "text/html"
mailer.encoding = 2
mailer.subject = "Password Request from the Advanced Password System"
mailer.wordwrap = true
mailer.wordwraplen = 50
Mailer.RemoteHost = SASMTPMAIL_RemoteHost
mailer.timeout = 120
Mailer.Priority = 3
Mailer.SendMail
set Mailer = nothing
End IF
If JMAIL_Installed = true Then
JMAIL_strBody = JMAIL_strBody & "FORM submitted at " & Now() & vbCrLf & vbCrLf
JMAIL_strBody = JMAIL_strBody & "This is your password as requested." & vbCrLf & vbCrLf
JMAIL_strBody = JMAIL_strBody & vbCrLf & CmdCheckForExisting("PASSWORD") & vbCrLf
Set JMail = Server.CreateObject("JMail.SMTPMail")
JMail.ServerAddress = JMAIL_ServerAddress
JMail.Sender = EmailNotification
JMail.Subject = "Password Request from the Advanced Password System"
JMail.AddRecipient CmdCheckForExisting("EMAIL")
JMail.Body = JMAIL_strBody
JMail.Priority = 3
JMail.Execute
End IF
%>
Your password has
been sent to the email address on file.
You should receive it shortly. |
<% Else %>
This username does not have an email address.
Your password cannot be emailed to you.
You will need to contact the site administrator.
<%
End If
End If
%>