Ok guys, here's what I'm doing
1. I have one field form where I ask for the username
2. I'm sending this form to a page called getpassword.asp (below)
[/tt]
GetPassword.asp
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/conn.asp" -->
<%
Dim rsEmail__MMColParam
rsEmail__MMColParam = "1"
if (Request.QueryString("loginname"
<> ""
then rsEmail__MMColParam = Request.QueryString("loginname"
%>
<%
set rsEmail = Server.CreateObject("ADODB.Recordset"
rsEmail.ActiveConnection = MM_conn_STRING
rsEmail.Source = "SELECT * FROM Users WHERE login = '" + Replace(rsEmail__MMColParam, "'", "''"
+ "'"
rsEmail.CursorType = 0
rsEmail.CursorLocation = 2
rsEmail.LockType = 3
rsEmail.Open()
rsEmail_numRows = 0
%>
<%
Do While (NOT rsEmail.BOF) AND (NOT rsEmail.EOF)
%>
<%
'***********************************************************
Dim objMsg, strFrom, strTo, strSubject, strBody, lngImportance
strFrom = "Lost Password Retrival Department"
'****************************** THIS LINE IS FOR TESTING ONLY
strTo = rsEmail("email"
'****************************** THIS LINE IS FOR TESTING ONLY
strSubject = "Your ...:: Lost Password Request ::... "
strBody = "Dear: " & rsEMail("First"
& "" & rsEmail("Last"
& "<br>" & "Your login password is: " & rsEMail("password"
& "<br>" & "Thank you for your request."
strFile = "bar.bmp"
Set objMsg = Server.CreateObject("CDONTS.NewMail"
objMsg.From = strFrom
objMsg.To = strTo
objMsg.Subject = strSubject
objMsg.Body = strBody
objMsg.Send
Set objMsg = Nothing
rsEmail.MoveNext()
rsEmail.Close()
loop
'Wend
%>
<%
response.redirect "%>
3. The page processes without errors but I don't get the email. Could someone please help me with this one.
It's been a long day... Thanks in advance.
<%=Tony%>
Just trying to learn...
Got ASP Error(s)? =
1. I have one field form where I ask for the username
2. I'm sending this form to a page called getpassword.asp (below)
[/tt]
GetPassword.asp
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/conn.asp" -->
<%
Dim rsEmail__MMColParam
rsEmail__MMColParam = "1"
if (Request.QueryString("loginname"
%>
<%
set rsEmail = Server.CreateObject("ADODB.Recordset"
rsEmail.ActiveConnection = MM_conn_STRING
rsEmail.Source = "SELECT * FROM Users WHERE login = '" + Replace(rsEmail__MMColParam, "'", "''"
rsEmail.CursorType = 0
rsEmail.CursorLocation = 2
rsEmail.LockType = 3
rsEmail.Open()
rsEmail_numRows = 0
%>
<%
Do While (NOT rsEmail.BOF) AND (NOT rsEmail.EOF)
%>
<%
'***********************************************************
Dim objMsg, strFrom, strTo, strSubject, strBody, lngImportance
strFrom = "Lost Password Retrival Department"
'****************************** THIS LINE IS FOR TESTING ONLY
strTo = rsEmail("email"
'****************************** THIS LINE IS FOR TESTING ONLY
strSubject = "Your ...:: Lost Password Request ::... "
strBody = "Dear: " & rsEMail("First"
strFile = "bar.bmp"
Set objMsg = Server.CreateObject("CDONTS.NewMail"
objMsg.From = strFrom
objMsg.To = strTo
objMsg.Subject = strSubject
objMsg.Body = strBody
objMsg.Send
Set objMsg = Nothing
rsEmail.MoveNext()
rsEmail.Close()
loop
'Wend
%>
<%
response.redirect "%>
3. The page processes without errors but I don't get the email. Could someone please help me with this one.
It's been a long day... Thanks in advance.
<%=Tony%>
Just trying to learn...
Got ASP Error(s)? =