<%@ Language=VBScript %> IEEE Survey Password Retrieval <% dim username dim conn dim RSbuffer dim userEmail, userPass,retrieve dim bodyText set conn = server.CreateObject("ADODB.connection") Conn.Open ConnectionString retrieve = trim(Request.Form("retrieve")) %>
ELECTRIC POWER ENGINEERING EDUCATIONAL RESOURCES SURVEY
 Power Engineering Education Committee of IEEE Power Engineering Society
 Reporting Period: Fiscal or Academic Year '05-'06
 
<% if retrieve <> "yes" then %>

Troubleshooting For Login

-The IEEE survey site recommend Internet Explorer browser of any version or Netscape version 4.5 and higher.
-Password is case sensitive. E.g: IEEE is different that IeEe
-For IE, you must set this site as a 'Trusted site' if your Internet Security setting is set to 'high'
-For IE, remove 'www.powerlearn.org' from restricted site list.

Retrieve Password

your password will be send the email you have provided during registration.

Type your username

<% else userName = trim(Request.Form("userName")) if userName <> "" then 'check if it's an empty input ' **** GET THE ADMIN MAIL and password and send email to the approved user sqlQuery = "select * from variable_table where description = 'admin_mail'" set RSBuffer= conn.Execute(sqlquery) if RSBuffer.EOF = false then adminMail = trim(RSBuffer("value")) end if Set Mail = Server.CreateObject("IPWorksASP.SMTP") Mail.MailServer = "mailhub.iastate.edu" Mail.From = adminMail sqlQuery = "select * from tbl_IEEE_user where USUSERNAME='"&userName&"'" set RSbuffer = conn.Execute(sqlQuery) if RSbuffer.eof = false then bodyText="Dear "&trim(RSbuffer("USFNAME"))&" "&trim(RSbuffer("USLNAME"))&vbCrLf&vbCrLf bodyText=bodyText&"Here is your password:"&vbCrLf&trim(RSbuffer("USPASSWORD"))&vbCrLf bodyText=bodyText&vbCrLf&"Please write the password in a piece of paper." bodyText=bodyText&vbCrLf&"Thanks." Mail.SendTo = trim(RSbuffer("USEMAIL")) Mail.Subject = "[IEEE Survey] Your Password Retrieval" mail.messageText = bodyText mail.Send %>

Your password has been sent to the email that you have provided by that username.

<% else %>

Sorry, the username you have given is an invalid username.

<% end if end if end if set RSBuffer = nothing set COnn = nothing %>