<<
login_file="users.txt"
email_col=3
email_templatename="template.txt"
>>
<html>
<title>Lost Password</title>
<form method=post action=getpassword>
<table border=0 cellpadding=2 cellspacing=0 bgcolor=#EEEEEE>
<tr><td><font size=1 face=arial>
Enter Email to Recover Lost Password</font></td></tr>
<tr><td>
<< IF err_msg != "ERROR" THEN DISPLAY err_msg /DISPLAY /IF
err_msg="ERROR"
>></td></tr>
<tr><td>
<input type=text size=20 name=EmailOnFile>
<input type=submit value="Go">
</td></tr></table>
</form>
</html>
<<overlay getpassword
COPY FILE=login_file TS="," TO al_data /COPY
al_data=GETCOLEQ(al_data,email_col,EmailOnFile)
IF al_data[1]="" THEN
al_err="Email not on file. Sorry."
ELSE
myLogin=al_data[1]
myPassword=al_data[2]
COPY FILE=email_templatename TS="," TO void /COPY
mytext=void[1]
mysubject=void[2]
# search and replace template codes /#
mytext=REPLACEALL(mytext,"[email]",EmailOnFile)
mytext=REPLACEALL(mytext,"[login]",myLogin)
mytext=REPLACEALL(mytext,"[password]",myPassword)
mysubject=REPLACEALL(mysubject,"[Email]",EmailOnFile)
NETMAILSEND("",EmailOnFile,mysubject,mytext,
"40","","text/html","")
al_err="Password recovered. Check your email."
/IF
GOTO PAGE
>>